phoxd
phoxd

Reputation: 1622

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">

Upvotes: 0

Views: 395

Answers (2)

Ron.Basco
Ron.Basco

Reputation: 2446

as simple as this. vertical-align: middle;

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

Upvotes: 0

Luca De Nardi
Luca De Nardi

Reputation: 2321

Just set the range vertical align to middle

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

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

Upvotes: 1

Related Questions