Dandy Dandy - 3 months ago 13
CSS Question

align text with inputbox and div

div which i use as border i wanted it to be in vertically center it looks like div going upwards

div going upward



<label> Application </label> <input type="text" style="width:10%; bottom:20px;"> <div style="width:1px; height:20px; background-color:grey;display: inline-block"></div> <label> Iteration </label> <input type="text" style="width:10%">




Answer

Use vertical-align: middle; to align vertically.

<label> Application </label> <input type="text"  style="width:10%; bottom:20px;">  <div style="width:1px; height:20px; background-color:grey;display: inline-block;vertical-align: middle;"></div> <label> Iteration </label>  <input type="text" style="width:10%">

Comments