View Full Version : Changing page color

12-20-2005, 11:18 AM
Howdy. I'm running a site for a company, using osCMax.

They have a catagory for "Pink" items. They would like for the page to have something "Pink" on it when browsing the Pink catagory or any of the Pink items.

What I'm trying to figure out is how do I add an item/change a color of something on the page dependant on the catagory being viewed?

I'm currently reading the template PHP code, but I must admit that I don't even know where to start looking.

Thanks for anybody who can understand my problem and help!

12-20-2005, 11:30 PM
Not sure which template you are using, but I would start by looking at the stylesheet.css file in the template directory. Just start changing colours and see where it leads you. There are some good documents in the How to section of the OscDox Guide link on the left side of this forum also.

12-21-2005, 07:03 AM
Mainly what I was looking for was the PHP code that decides what catagory is being shown, so I could switch the stylesheet if das customers go into "Pink", then switch back to normal when they go into "Mens Wear."

12-23-2005, 10:41 PM
It all done with CSS and has NOTHING to do with PHP as COLOR is NOT determined at any point with PHP...it is straight HTML and CSS Styles.... However you could cause PHP to CHANGE the style defined in the HTML....depending on the catagories..... This would require changing ALL the HTML and coding "IFs" in PHP... or maybe by APPENDING the catagory number/id.... then in CSS define "pink" theam just for the ladies and normal for all other.....

TD.main, P.main {
font-family: Verdana, Arial, sans-serif;
font-size: 11px;
line-height: 1.5;

TD.main.23, P.main23 {
font-family: Verdana, Arial, sans-serif;
font-size: 11px;
line-height: 1.5;

(where 23 is the ID for LADIES catagory...)

A SIMPLER solution (and I did this for another company - they wanted different colors on EACH catagory)

Wrap all PICS with a BOADER color (I use a SCRIPT that created a "correct maximum size" main pic and a thumb nail and gave each a 10pixel wide solid color boarder)

OR you could look a using a MULTI-STORE setup....

Multiple "Mini-Stores" with 1 Admin

Which allow you to offer same or diffent product on each site but each site can have totally diffent looks/feal..... Thus a Pink Girly Girl site at http://yoursite/ladies/index.php and then have a Macho Mens site at http://yoursite/mens/index.php and a default at http://yoursite/main/index.php all ADMIN would be worked in ONE admin site...https://yoursite/someadmindir/index.php

Then put in each site a LINK to the "MEN WARE " or "Womens ware" button in the header....

Good Luck!