PDA

View Full Version : My CSS Broken after latest change


mbrady
Oct-15-2005, 07:28 AM
It looks like the latest CCS upgrade has messed up my customization a little. I am set up with a custom banner and color scheme for each category, but I only want that scheme to be visible in the main category page. Once you go into a gallery, I go with the standard black color scheme and a smaller subset of custom header stuff.

This worked fine before since the "category_MyCategory" class was only used on the main category page. But now, that class is also attached to each gallery within the gallery, so that causes my full category customization to show up under each gallery page.

So basically what I need to do is turn on certain customizations only when the particular category class is there, but NOT when the "galleryPage" class is there, but I'm not sure how to do that sort of conditional CSS situation.

My site is http://www.ruama.com

Thanks,
Matt

Andy
Oct-15-2005, 07:38 AM
It looks like the latest CCS upgrade has messed up my customization a little. I am set up with a custom banner and color scheme for each category, but I only want that scheme to be visible in the main category page. Once you go into a gallery, I go with the standard black color scheme and a smaller subset of custom header stuff.

This worked fine before since the "category_MyCategory" class was only used on the main category page. But now, that class is also attached to each gallery within the gallery, so that causes my full category customization to show up under each gallery page.

So basically what I need to do is turn on certain customizations only when the particular category class is there, but NOT when the "galleryPage" class is there, but I'm not sure how to do that sort of conditional CSS situation.

My site is http://www.ruama.com

Thanks,
Matt

:wave hiya matt - i'll make sure jt sees this.

{JT}
Oct-15-2005, 07:53 AM
We have added category and gallery up to the body class as well, so even if a category and gallery share the same category name, they can be distinguished by using gallery or category in the CSS. For example, I just fixed your breadcrumb for the category 'everything else'.

OLD: .category_Everything_Else #breadcrumb {display:none}

NEW: .category.category_Everything_Else #breadcrumb {display:none}

mbrady
Oct-15-2005, 08:37 AM
We have added category and gallery up to the body class as well, so even if a category and gallery share the same category name, they can be distinguished by using gallery or category in the CSS. For example, I just fixed your breadcrumb for the category 'everything else'.

OLD: .category_Everything_Else #breadcrumb {display:none}

NEW: .category.category_Everything_Else #breadcrumb {display:none}
Thanks for the help, I changed the rest to match. It fixed it for Firefix and Opera, but it's still broken with IE. :scratch

Matt

mbrady
Oct-15-2005, 10:15 AM
I sort of cheated and added this to my css section:

.galleryPage .title {color: #00CC00}
.galleryPage #banner {display:none}
.galleryPage {background-color:#000000}
.galleryPage #breadcrumb {display:block}

With that there, it looks ok in all browsers (well, the main PC ones at least, I don't have a Mac).

I'm not sure why IE choked on the other solution, but I'm happy with how it's looking now. Thanks for your help.

Matt

pat.kane
Oct-15-2005, 11:03 AM
Thanks Matt and JT. I was trying to figure out why a category background image was also being seen on a gallery page. Adding the .category fixed the problem. Now I'll have to try the .galleryPage to see if that is what should be used in the new template section.

Mike Lane
Oct-16-2005, 04:16 PM
I'm not sure why IE choked on the other solution, but I'm happy with how it's looking now. Thanks for your help.

Matt
Because IE6 bites the big one. IE6 doesn't properly handle multiple selectors. So this would work just fine in Firefox but not necessarily IE.

.class1.class2.class3 {background:red;}
.class1.class2, .class1.class3 {background:red;}

here's hoping IE7 is better!