Wickham Posted June 7, 2009 Report Share Posted June 7, 2009 (edited) 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: Component 1 Component 2 Component 3 Component 4 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 June 7, 2009 by Wickham Quote Link to comment Share on other sites More sharing options...
PicnicTutorials Posted June 7, 2009 Report Share Posted June 7, 2009 Eddie had this delima a few weeks back. He ended up using jQuery I believe to style the "whole" select. I messed with it a few few weeks ago and was unable to style it any differently than default. All I was able to find at the time was selected="selected" that you found as well. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.
× 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.