Jump to content

Styling a form Option tag


Wickham

Recommended Posts

If you have a series of options inside a select tag and you want to highlight one or two, you can use the selected="selected" code but this uses the browser default color (blue in IE).

 

If you want to style one or two with your own styles, w3schools says that inline styles or a class is possible http://www.w3schools.com/TAGS/tag_option.asp

 

However, I have found that a color does work, but not font-weight: bold; or font-style: italic in IE7.

  • Select product:

 

Any ideas how to get just one or two options with a different style without styling the whole select tag?

 

Edit: I've found that Firefox shows all styles but IE7 only shows the color, not bold or italic.

 

I tried putting a p tag inside and styling that, but it didn't work.

Edited by Wickham
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...