Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / changing background color of select area?

changing background color of select area?

Locked

Views: 2,396

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
13 Apr 2010, 6:00 PM
#1
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

changing background color of select area?

Hi -

I've got most of my css formatting the way I want it. The manufacturers sidebox, however, seems to be picking up my computer's highlight color for its background color upon selection.

(I've renamed "Manufacturers" to "Designers" on my page, by the way.)

So...any ideas on on how I might override this?

Thanks.

Edit: site is https://www.cinderellaantiques.com. Thanks.

13 Apr 2010, 6:13 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: changing background color of select area?

That would be the SELECT tag

13 Apr 2010, 6:22 PM
#3
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: changing background color of select area?

OK, so the SELECT tag will accept modifiers like ":focus" ":active" and the like for background colors? And, will this override someone's preference setting for highlight colors?

Thanks.

13 Apr 2010, 6:25 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: changing background color of select area?

OK, so the SELECT tag will accept modifiers like ":focus" ":active" and the like for background colors?
Try it
And, will this override someone's preference setting for highlight colors?
?????What pref settings????
I do not believe that one can exert control over anothers browser settings

13 Apr 2010, 6:31 PM
#5
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: changing background color of select area?

kobra:

Try it

I already made a cursory effort, without success. I'll take a closer look.

?????What pref settings????
I do not believe that one can exert control over anothers browser settings

Not the browser settings; the user's preference on his PC. On a Mac, it's in System Preferences->Appearance->Highlight Color. I don't know where it is on a PC, but I'm sure there's an equivalent.

Maybe it's inappropriate to try to override these settings, but it would make for a more pleasant color scheme on the site display.

13 Apr 2010, 10:20 PM
#6
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: changing background color of select area?

I've done a bit more looking, and still don't fully understand what's going on here. It's somewhat tough to debug using Firebug, in that the formatting I want to see (for when a selection is made) is only applied for an instant, and then the page updates based on the selection.

Here's the CSS I'm using:

input:focus, select:focus, select:active, select option, select option:focus, select option:active, textarea:focus {
	background: #fff4fc;
}

This doesn't change the color when an item is selected, though. At this point, I'm not sure what to do next, as the "select" tag doesn't seem to respond to CSS formatting the way other tags do.

Any ideas, anyone? Thanks.

14 Apr 2010, 9:44 AM
#7
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: changing background color of select area?

select,
input:focus, select:focus, select:active, select option, select option:focus, select option:active, textarea:focus {
background: #fff4fc;
}

Try removing the 'select,' first, then the others one-by-one. I'm not sure how exactly you want it to behave, but when I removed everything but 'select option' it did something different.

14 Apr 2010, 3:13 PM
#8
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: changing background color of select area?

I appreciate the suggestion, but I don't see how removing things from this line is going to help. I want to be able to set the background color of whatever I click on in this box. Currently, it's picking up the highlight color from my system preferences.

It may be the case that this is something I can't override, but I was hoping someone else had some experience with this. I'm a bit weak with the form/input/select stuff in HTML.