[thelist] TIP: Styling dropdown menus in NS 4.7

Niklaus Haldimann nhaldimann at gmx.ch
Fri Nov 9 09:04:49 CST 2001


> use your detections scripts for browsers to dtermine whether
> to display the "span" or not - a fav script of mine is ASP detection, quick
> eay and can be used in config file at the top of your pages.
> 
> <span style="font-family:verdana; font-size:10px;">
> <select>
> <option>test</option>
> <option>test1</option>
> </select>
> </span>

an addendum to this tip: you don't even need to do browser detect 
wheter to apply the span or not. usually i do this to style a select 
menu:

<span class="myselect">
<select class="myselect">
<option>whatever</option>
</select>
</span>

nn 4.x will style according to the span around the select menu, all 
other browser will style according to the class specified for the 
select element. like this you can define one class (myselect) for all 
css-capable browsers. of course nn 4.x won't listen to extra gimmicks 
like background colors but it will at least pick up font face and 
size of the class.

n.




More information about the thelist mailing list