Forum Moderators: not2easy

Message Too Old, No Replies

How make option kind size font

         

romzinho2k7

7:20 am on May 9, 2006 (gmt 0)

10+ Year Member



Hi friends, all good?

It was wanting to make an equal thing of the image that I am placing ( [img154.imageshack.us...] ) To place option with these properties of the source and the size. Somebody would know as to make this?

Sorry my English

Thanks

Robin_reala

11:19 am on May 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Originally I thought you could do something like:

option + option { font-size: larger; }

but then I realised that it was larger than the parent, not the sibling, so that wouldn't work. So without CSS3's :nth-child you'll need to class each one up. E.g.:

HTML:

<select>
<option class="small">small</option>
<option class="medium">medium</option>
<option class="large">large</option>
</select>

CSS:

option.small { font-size: small; }
option.medium { font-size: medium; }
option.large { font-size: large; }

Fwiw, the proposed CSS3 notation would look like this:

option:nth-child(1) { font-size: small; }
option:nth-child(2) { font-size: medium; }
option:nth-child(3) { font-size: large; }

romzinho2k7

9:30 pm on May 9, 2006 (gmt 0)

10+ Year Member



Yes.... thanks

Work in firefox, but not work in IE.

It would have some solution?

Thanks.