PhoxKiD PhoxKiD - 8 days ago 4
CSS Question

Align input type range with other elements

Is there more reliable way to align this?



input[type=text] {
position: relative;
top: -5px;
}

<input type="range">
<input type="text">




Answer

Just set the range vertical align to middle

input[type=range] {
    vertical-align: middle
}

input[type=range]{
  vertical-align:middle;
}
<input>
<input type="range">