Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Manufacturers - Please Select

Manufacturers - Please Select

Views: 1,095

Results 1 to 11 of 11
4 May 2013, 12:11 PM
#1
technologynow avatar

technologynow

New Zenner

Join Date:
Apr 2011
Location:
UK
Posts:
33
Plugin Contributions:
0

Manufacturers - Please Select

I have the manufacturers.php add-on installed and the drop-down option selected. What I'd like to do is change the background color of the manufacturer (Designers) sidebox dropdown to match the site

The manufacturers list scroll box by default has a blue (#316ac5) selector bar that I'd like to change to #9acc99 but I can't find where.

I note that the top question was asked in 2006 without any replies, and the bottom question was asked back in 2008 with no replies.

I do know how to change the colors on all the boxes except the list of manufacturers box which is completely different. The manufacturers box has a default blue background to the 'please select' text or to the 'selected manufacturer' text, but this color is not findable using firebug, nor is it anywhere in the css files or (as far as I can see) in any of the php files. I have also been unable to find this using the 'developers tool kit'. Blue is not suitable for every template, but none of the usual ways of finding and changing a color seem to apply in this particular instance.

Is there anyone who has ever been able to change the 'please select' text color in the Manufacturers box who would like to provide an answer to this long standing question please. It's not often I get stumped, but this has me completely fooled:dontgetit.

4 May 2013, 3:02 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Manufacturers - Please Select

What's the URL to the site you're trying to adjust?

4 May 2013, 3:29 PM
#3
technologynow avatar

technologynow

New Zenner

Join Date:
Apr 2011
Location:
UK
Posts:
33
Plugin Contributions:
0

Re: Manufacturers - Please Select

I'm using a local server and creating a new template so it's not online yet, but I haven't been able to find any way of changing the color of the blue text of the manufacturers list.

4 May 2013, 4:12 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Manufacturers - Please Select

You can style the background of the entire SELECT field with CSS.

But you can't style the color or background of the entries as they appear without the user clicking in the fields to set focus there. That's universally dependent on the browser and operating system. There are no CSS options for that. It's not a Zen Cart issue.

4 May 2013, 6:29 PM
#5
technologynow avatar

technologynow

New Zenner

Join Date:
Apr 2011
Location:
UK
Posts:
33
Plugin Contributions:
0

Re: Manufacturers - Please Select

Thanks for that.

I guessed that may be the case. It looks as though there are no css settings in Zen Cart for that particular set of texts, so the browser just uses the browser default.

Now I know there is no easier way I may take a look at the core files and see if I can add a div and then add the css. Didn't want to reinvent the wheel if someone had already found a way of doing this without changing the core.

4 May 2013, 6:42 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Manufacturers - Please Select

Let me add more clarity: you can't style the "selected" element. That's browser and Operating-System dependent. As I said, it's not a Zen Cart thing. It's a browser thing.

And the :focus can't be targeted without clicking, so isn't useful since clicking to trigger :focus causes it to actually click and reload the page with the clicked selection, thus messing with :focus on that is pointless.

Exception: You might be able to write some jQuery code to override the browser's built-in treatment, but that requires writing custom code and adding the jQuery framework to your site.

This is why sites that really want to extremely customize the visual appearance of that element actually completely rewrite it using a javascript framework instead of using basic HTML+CSS.

Summary: be prepared to invest quite a bit of time to do that. Time which is probably better spent in other areas, especially since you'd need to do very extensive testing across all the browsers you intend to support, since each browser has its differences. It's really not worth it.

4 May 2013, 8:55 PM
#7
technologynow avatar

technologynow

New Zenner

Join Date:
Apr 2011
Location:
UK
Posts:
33
Plugin Contributions:
0

Re: Manufacturers - Please Select

Nothing just happens. If something changes when a mouse hovers over text on a screen it's because some code language is instructing it to. The code may be in the program software (which in this case it isn't) or in the browser software, or in the users computer software, but if something changes there is code that causes it.
If there is code, even default browser code, then there will be a way of changing it.

5 May 2013, 1:55 PM
#8
technologynow avatar

technologynow

New Zenner

Join Date:
Apr 2011
Location:
UK
Posts:
33
Plugin Contributions:
0

Re: Manufacturers - Please Select

For anyone in the future who is seeking an answer to how to change the default 'select' background color of a website form the answer is as follows:

It is possible to change the background color of the selected item on the list, but it takes a lot of code to do so, and is not worth the effort for the reason I give at the end.

The default color not only differs from browser to browser, each browser differs from program to program.

For example, a single version of Firefox will produce a blue background if you view the site in Windows, a brown background if you view the same site in Ubuntu, a yellow background if you view the site on a Mac, and so on.

That's a single version of Firefox. Older or newer versions have different colors!

Multiply that by the number of different browsers, Chrome, Internet Explorer, and all the others, and you will see the problem. Each version of each browser gives different colors, and code would need to be written for each different browser in each different version used on each different operating system. It makes the usual problems with older IE browsers pale into insignificance.

The reason why this is not feasible to do, is not because it is impossible, but because it would be a never ending exercise. As soon as a new browser came out, or a new version of an old one, your code would need supplementing with new code to ensure it worked on the newly updated browser on all the different operating systems. In short, it becomes a never ending task that can never be fully completed.

From a web design point of view, unless you have an in house designer who is going to be constantly updating code, it's not worth doing.

6 May 2013, 11:02 PM
#9
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Manufacturers - Please Select

technologynow:

From a web design point of view, unless you have an in house designer who is going to be constantly updating code, it's not worth doing.

I thought DrByte already said as much earlier..
:smile:

DrByte:

Summary: be prepared to invest quite a bit of time to do that. Time which is probably better spent in other areas, especially since you'd need to do very extensive testing across all the browsers you intend to support, since each browser has its differences. It's really not worth it.

8 May 2013, 6:09 PM
#10
technologynow avatar

technologynow

New Zenner

Join Date:
Apr 2011
Location:
UK
Posts:
33
Plugin Contributions:
0

Re: Manufacturers - Please Select

I thought DrByte already said as much earlier

He did indeed :smile:

I'm just stubborn I guess and don't like being defeated, so I thought I'd put more information on in case anyone as stubborn as me comes along later and doesn't want to take DrByte's word for it. Adding the extra detail may stop visitors wasting their time.

8 May 2013, 6:32 PM
#11
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Manufacturers - Please Select

technologynow:

He did indeed :smile:

I'm just stubborn I guess and don't like being defeated, so I thought I'd put more information on in case anyone as stubborn as me comes along later and doesn't want to take DrByte's word for it. Adding the extra detail may stop visitors wasting their time.

Ahhh so you're one of those people who doesn't "believe fat meat is greasy" as my BFF is fond of saying..
:laugh: