CSS1 override question

Tom Schlarman (tschlarm@Adobe.COM)
Tue, 5 Nov 1996 09:59:00 -0700

Message-Id: <199611051650.IAA26708@elroy.corp.Adobe.COM>
From: "Tom Schlarman" <tschlarm@Adobe.COM>
To: "wwwhtml" <www-html@w3.org>
Subject: CSS1 override question
Date: Tue, 5 Nov 1996 09:59:00 -0700

Another question for the CSS1 experts out there.

How does CSS1 handle conflicting attributes in styles of the same tag?

For example:

Suppose a linked stylesheet defined H2 as:

H2 { color:green; text-align:center }

and later on another linked stylesheet defined H2 as:

H2 { color:purple; text-align:left }

What attributes would you expect to be applied?  

The CSS1 spec says the weight of reader rules are less important than the
weight of author rules.  In this case they are both author rules with equal
importance and weight.  Shouldn't the latter definition win and be applied
(purple & left)?

MSIE applys the 1st H2 (green and centered).

MSIE seems to take the approach that if an element of a style has already
been assigned (ie. text-color) then that attribute in following style
definitions are ignored for that tag.

Admittedly, this is kind of a silly example, but if you link more than 1
style sheet this could happen with certain elements of the same tag (color
overrides or indent overrides probably).

If anybody can clear this up for me, I would really appreciate it.



Tom Schlarman