ming yeow ming yeow - 1 month ago 7
CSS Question

Setting font-size for dropdown in chrome does not seem to affect the styling

I set the font-size for the dropdown in chrome, but it does not appear to change the size of the

<select>


It works on FF - when i set the font-size as 15px, it is distinctively bigger

wdm wdm
Answer

Some browsers will allow you to modify the font-size on its own and some will not.

You can hack the browser-specific style of a select element by setting a border style.

select {
  border: 1px solid #ccc;
  font-size: 2em;
}
<select>
    <option>Quick</option>
    <option>Brown</option>
    <option>Fox</option>
</select>

Comments