Previous Message
Next Message

Re: [css-d] Rules of CSS

Sent by Arlen Walker on 4 June 2003 12:12


On Wednesday, June 4, 2003, at 06:00  AM, Joseph A Nagy Jr wrote:

> Chris Blake wrote:
>> 1. Browser default
>> 2. External Style Sheet
>> 3. Internal Style Sheet (inside the 'head' tag)
>> 4. Inline Style (inside HTML element)
>> </quote>
>> Is this an absolute rule or are there exceptions. I`m just a little
>> worried about the use of the words "Generally speaking...."
>
> I always thought it was an absolute rule myself.

Yes, given equal specficity.

For example:

External style sheet says:

#navbar ul li a:hover {color:red;}

while Internal style sheet says:

a:hover{ color:green;}

Now, if I understand the cascade properly (and there's always a chance I 
don't) the links that are part of an unordered list in #navbar will 
color themselves red when hovered over, because the external style sheet 
code is more specific than the internal.


Have fun,
Arlen

-----
In God We Trust, all others must supply data

______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: