CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 6th, 2002, 12:05 PM
Douglas Douglas is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 10 Douglas User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 2 sec
Reputation Power: 0
CSS: Highlight color in <select>

How do I set the color of the highlighted (selected) option from a <select> field? For example, how would I change the color of the selected forum in the forum jump dropdown at the bottom of this page?

Thanks.

Reply With Quote
  #2  
Old August 6th, 2002, 02:19 PM
adios adios is offline
Senior Citizen
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2001
Location: leftcoast
Posts: 2,019 adios User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 15
You wouldn't.

Reply With Quote
  #3  
Old August 6th, 2002, 02:46 PM
Douglas Douglas is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 10 Douglas User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 2 sec
Reputation Power: 0
Ahh, that would probably explain why I couldn't find out how.

Thanks for the reply.

Reply With Quote
  #4  
Old August 7th, 2002, 05:26 AM
Mirax's Avatar
Mirax Mirax is offline
Senior Member
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jun 2000
Location: Enschede, The Netherlands
Posts: 1,527 Mirax User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 55 m 57 sec
Reputation Power: 14
You could

Code:
<style>
option.opt1 {
	background: #F1F1F1;
}
option.opt2 {
	background: #0088FF;
}
</style>

<select>
<option value="" class=opt1>Test</option>
<option value="" class=opt1>Test</option>
<option value="" class=opt2 selected>Test</option>
<option value="" class=opt1>Test</option>
<option value="" class=opt1>Test</option>
</select>
__________________
There are 10 types of people in this world - those who understand binary and those who don't...

PHP | MySQL | DevShed Forum Search | Google Search

Reply With Quote
  #5  
Old August 7th, 2002, 10:38 AM
Douglas Douglas is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 10 Douglas User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 2 sec
Reputation Power: 0
Mirax,

That isn't quite what I want to do. I want to set the color of the item the mouse is over. Currently it defaults to whatever "Selected Items" in the Display Properties is set to.

Reply With Quote
  #6  
Old August 7th, 2002, 11:25 AM
Mirax's Avatar
Mirax Mirax is offline
Senior Member
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jun 2000
Location: Enschede, The Netherlands
Posts: 1,527 Mirax User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 55 m 57 sec
Reputation Power: 14
okay, something with option onMouseOver="highlight()" and a javascript function which changes the style of the option should do it then?

Reply With Quote
  #7  
Old August 7th, 2002, 11:46 AM
jkd jkd is offline
CF sMod
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: Maine, USA (a.k.a. Boonies)
Posts: 242 jkd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 43 sec
Reputation Power: 13
Send a message via ICQ to jkd Send a message via AIM to jkd Send a message via Yahoo to jkd
IE does not fire any events on <option/> elements.

In Gecko, with XBL form bindings enabled, this is possible. But they are disabled by default.
__________________
Jason Contact Me
Super moderator @ CodingForums

Reply With Quote
  #8  
Old August 7th, 2002, 03:25 PM
Mirax's Avatar
Mirax Mirax is offline
Senior Member
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jun 2000
Location: Enschede, The Netherlands
Posts: 1,527 Mirax User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 55 m 57 sec
Reputation Power: 14
forget my JavaScript comment, it's nonsense

The only thing I can think of would be some css code, but I can't find it anywhere One would expect it's possible to change the color like it is possible to change the scrollbar color (also system dependant)

Reply With Quote
  #9  
Old August 7th, 2002, 05:12 PM
adios adios is offline
Senior Citizen
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2001
Location: leftcoast
Posts: 2,019 adios User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 15
You wouldn't.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > CSS: Highlight color in <select>

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap