Style font size of an option tag
I am having some real trouble styling the text within an option box! I have tried everything, all I can get to work is colour. I have look over many forums and on Google but nothing seems to work, what am I doing wrong?
<select name='fontsize'>
<option value=''>Size</option>
<option value='1' style='font-size:10px;'>Size One</option>
<option value='2' style='font:10px;'>Size Two</option>
<option value='3' style='size:10px;'>Size Three</option>
<option value='4'><h2>Size Four</h2></option>
</select>
None of these work? Also tried applying a class and styling in there but also nothing
Any help would be great!
Thanks,
S33ker.
webwiz posted this at 16:02 — 29th August 2009.
He has: 629 posts
Joined: May 2007
You are not doing anything wrong. Form elements are notoriously difficult to style. You may like to look for a JavaScript solution, such as this jQuery.combobox.
Cordially, David
--
delete from internet where user_agent="MSIE" and version < 8;
S33ker posted this at 17:09 — 29th August 2009.
They have: 38 posts
Joined: Jun 2008
Hmmm....
Thanks for the info and link
May just leave it out, basically what I was doing was adding a font size changer to my BBcode textarea, thought it would be nice to see the size of font size 1 for example. They can just preview post first lol.
Thanks again!
S33ker.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.