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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I apply css styles to drop down menus? 1

Status
Not open for further replies.

painted

Technical User
Feb 3, 2003
1
US
I have applied a style (font size 1) to a drop down menu using the CSS but I don't want that style to apply to all of my dropdown menus in my site. Is it possible to apply it to several menus, but not all? Thank you in advance.
 
Yes. That is what the class attribute is for.
Code:
<style type=&quot;text/css&quot;>

.mySelect{
  font-size: 12pt;
  color: red;
}
</style>
<!-- create a combobox with mySelect style -->
<select class=&quot;mySelect&quot;>...</select>
<!-- create a default style combobox -->
<select>...</select>


-pete
I just can't seem to get back my IntelliSense
 
...and then another style:

<style>
.myOtherStyle{
font-size: 16px;
color: magenta;
}
</style>
</head>
<body>

<select class=&quot;myOtherStyle&quot;>...</select>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top