PDA

View Full Version : CSS for <option> tags.


Counter++
10-29-2002, 06:13 PM
First of all I must say w00t, first post. Now that that's done:

I am having problems figuring out the CSS for my dropdown menu. I am using this code:

<script language="javascript">
var browser=navigator.appName
if (browser == "Microsoft Internet Explorer")
{
document.write("<STYLE></STYLE>");
}
else{document.write("<null>");
}
</script>
<script language="JavaScript">
<!--
function formHandler(form){
var URL = form.page.options[form.page.selectedIndex].value;
window.location.href = URL; }
--></script>
<form name="anime_navigation">
<select name="page" size="0" onChange="formHandler(this.form)">
<option value="">Cowboy Bebop Navigation</option>
<option></option>
<option value=URL of page>Full Series Review</option>
<option value=URL of page>Character Descriptions</option>
<option value=URL of page>Episode Summaries</option>
<option value=URL of page>Bounty Listing</option>
<option value=URL of page>CD and DVD Listings</option>
<option value=URL of page>Song Lyrics</option>
<option value=URL of page>Glossary</option>
<option value=URL of page>Opening / Closing</option>
<option value=URL of page>Screenshots</option>
<option></option>
</select>
</form>

I was wondering if there was a way to change the very first option to bold and the rest to standard. Also are there ways to make the highlight color different as well as the scrollbar? I can get the BODY one but not the dropdown one.

Thanks, Counter++

daynah
04-28-2003, 04:02 PM
I don't think the scrollbar colors of the drop down menu could be changed. If you find out please tell me though. :) I've been searching for a while.

I tested the drop down menu to see if I could get the first line to bold, and the rest to be standard, but CSS doesn't seem to like that. What you can do instead is change the color of the first item to red or something that stands out like this:


<option value=URL style="color:red; background-color:#c0c0c0">Full Series Review</option>


:)