I have a select field and no matter what I do I can't get the text to stop sticking to the top of the box.
Here is an example of how it looks:
If I use padding-top
then it pushes down the arrow button as well, which I don't want. I have also tried line-height
with no effect.
Here is the relevant CSS:
#header .nav .misc .search .search_holder .cats select {
width: 111px;
height: 29px;
border-top: 1px solid #97ad00;
border-bottom: 1px solid #97ad00;
border-left: none;
border-right: none;
padding-left: 8px;
font-family: Roboto, Arial;
font-size: 14px;
background: url('../images/search-cats-bg.png') 0 0 repeat-x;
color: #b2b2b2;
}
#header .nav .misc .search .search_holder .cats select option {
padding-top: 5px;
}
#header .nav .misc .search .search_holder .cats select option.last {
padding-bottom: 5px;
}
Edit: Added HTML.
HTML:
<div class="cats">
<select id="search_cats" class="search_cats" name="cat">
<option value="all">All Categories</option>
<option value="sports">Sports Cards</option>
<option value="gaming">Gaming Cards</option>
<option value="non-sport">Non-Sport Cards</option>
<option value="supplies" class="last">Supplies & Storage</option>
</select>
</div>
Why is it doing this and how can I fix it?
Edit: Seems it can't really be fixed, found this question:
I want to vertical-align text in select box
If you look at the answer from "Shelly Skeens" then you will find that FF decided to set the built-in line-height
to normal !important
and hence it can't be overridden.