Reputation: 67
I wonder why CSS' height can't resize a 'select' element in HTML.
<select>
<option>One</option>
<option>Two</option>
</select>
and CSS:
select {
height: 40px;
}
Thanks in advance!
Upvotes: 3
Views: 1922
Reputation: 79
<select>
<option>One</option>
<option>Two</option>
<option>Three</option>
<option>Four</option>
<option>Five</option>
</select>
select {
height: 50px;
border:1px solid #acacac;
width:250px;
line-height: 50px;
color:#df781b;
font-size:15px;
}
try this one, I did add some styling to it just so it might help you out.
Upvotes: 1
Reputation: 120
if any css overriding this class then use following class
select {
height: 40px !important;
line-height: 40px;
border: 1px solid #ccc;
width: 200px;
}
Upvotes: 1
Reputation: 2263
You should use line-height along with. Below fiddle shows you the same.
select {
height: 40px;
line-height: 40px;
border: 1px solid #ccc;
width: 200px;
}
Upvotes: 4