Forums / Templates, Stylesheets, Page Layout / CSS question - class defined multiple times in default style sheet

CSS question - class defined multiple times in default style sheet

Locked
Results 1 to 2 of 2
This thread is locked. New replies are disabled.
19 Feb 2008, 00:23
#1
ksolito avatar

ksolito

New Zenner

Join Date:
Nov 2006
Posts:
44
Plugin Contributions:
0

CSS question - class defined multiple times in default style sheet

My customer wants me to increase the font size and change the color of center column category and sub-category names. Should be easy enough to do...
<!-- BOF: Display grid of available sub-categories, if any -->
<div class="categoryListBoxContents" style="width:33%;">...
...except that I've found .categoryListBoxContents is defined in four separate places in the default stylesheet. My understanding, maybe incorrect, is that that only the last class or id definition will be used.

I'd be grateful if somebody could share some insight as to the css strategy in this particular case, and my best solution for making the change I mentioned above.
19 Feb 2008, 00:49
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Posts:
21,876
Plugin Contributions:
6

Re: CSS question - class defined multiple times in default style sheet

If the same property is defined more than once for a given selector, the last one will override the rest. You can set different properties for a selector in different declarations, though best practice would be to consolidate whenever practical for simplicity.