Sent by Steve Maxey on 24 July 2003 17:05
At 10:44 AM 7/23/2003, you wrote:
>At 10:20 AM 7/23/2003, Nelson_Rodriguez-Pena wrote:
>> >> - Classes, IDs and elements are listed in alphabetical order unless
>> >> otherwise noted...
>>
>>This is not completely right, since the order has a value when evaluating
>>rules, so most times you may want to establish a precise order, for
>>instance: I want to specify in BODY general attributes, but use specific
>>ones in ACRONYM. It can be done if I use:
>>
>>body{...}
>>acronym{..}
>>
>>but not
>>
>>acronym{..}
>>body{...}
>>
>>With IDs the same thing happen, position inside the document is relevant.
>>
>>I think this apply to all your other structure as well...
>
>Really? I thought the cascade applied to the order in which the styling is
>applied as opposed to the order it is in within the style sheet (unless
>there are conflicting style sheets or in-line styles defining the same
>element, class or ID). My understanding of the cascading order (
>http://www.w3c.org/TR/CSS1#the-cascade -Rule 4) leads me to believe that
>the acronym element is more specific than the body and thus its style
>rules would take precedence over those set in the body. My experience has
>shown this to be the case for all but :link and its cohorts.
>
>Alex
Yes, but say you define base font-sizes in your #mainbody (14px) and
#sidebar (12px) divs and then use percentages for your h1, h2, and h3 tags,
intending that those percentages scale based on the font size set in the div.
Since h1-h3 would come before both mainbody and sidebar in your CSS when
arranged alphabetically, the font percentage sizes would scale based on the
user's default font size rather than those set in the divs, while those for
your #callout div would scale as you intended.
Of course, even methodologies that put all the html tag definitions before
all the classes would run into this sort-order problem.
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/