Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing styles for Select menus

Status
Not open for further replies.

ssidetv

Technical User
Aug 30, 2001
57
GB
Referencing
I have built this page on a template that contains a menu bar. Nested in the bar is a drop down select menu. I want that drop down to have a style consistent with the rest of the menu bar.

I therefore placed inside the head section of the template some style code that makes it work beautifully.

BUT on the page referenced above there are two other select menus that I do not want to carry that style.

Is there any way to tell one select menu to have one style and others to have a second style?

Thanks,

Nick
 
With css, you can define classes of elements. For example:

select {color : blue;}
select.red {color : red;}

<select>....</select> gives you a menu with blue writing
<select class=&quot;red&quot;>..</select> gives red writing.

So what you want to do is change your css file to make the blue menu at the top of your page a seperate class of 'select' like I have done in my example above.

Then in the code of your page, give it the class name that you have defined in your css file.

Ok?
Phil
 
No worries. Helping people gives me a nice warm rosy feeling deep inside. Or maybe that's just indigestion...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top