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

Drop Down Menu thoughts

Status
Not open for further replies.

Jimuniguy

Technical User
Mar 6, 2002
363
0
0
GB
Hi,

Just curious, does anyone know how to change the appearance of a drop down menu in a form using javascript, CSS or HTML commands?

Cheers

James
 
Try this css:

<html>
<head>
<title>Form</title>
<style>
.List {
BACKGROUND: lavender; FONT: 8pt verdana,arial,sans-serif
}
.Heading
{
color:navy;
background: #ffffcc;
}
</style>
</head>

<body bgcolor=&quot;#FFFFFF&quot; text=&quot;#000000&quot;>
<form name=&quot;form1&quot; method=&quot;post&quot; action=&quot;&quot;>
<select name=&quot;select&quot; class=&quot;Heading&quot;>
<option class=&quot;list&quot;>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
<option>Option 4</option>
<option>Option 5</option>
<option>Option 6</option>
</select>
</form>
</body>
</html>
 
Carefull with using styles in forms if you wnat this to work in Netscape 4. I normally have to do a browser sniff so that for Netscape 4 it dosent include the style. For some reason the form elements seem to disapear or dont work properly in Netscape. Ahhhh the joys!!
 
CSS does degrade to a certain extent. However Not all the attributes that CSS offer are cross browser. There are tables that you can find on the net that show the compatability of certain CSS elements. Most of the main elements work fine. Netscape 4 is a troublesome browser and although most CSS will work correctly in it... the form elements tend to corrupt. There is no other reason other than when Netscape 4 was produced..they obviosly didnt spend much time making CSS work extensivly. Netscape 6 is fine with styles and almost uses the same syntax now as IE 5 but there are still differences some better and some worse.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top