W3C home > Mailing lists > Public > www-html@w3.org > March 2003

Re: order of properties

From: Jim Dabell <jim-www-html@jimdabell.com>
Date: Mon, 10 Mar 2003 12:22:47 +0000
To: www-html@w3.org
Message-Id: <200303101222.47674.jim-www-html@jimdabell.com>

On Tuesday 11 March 2003 12:40 am, Sigurd Lerstad wrote:
> Hello,
> Does the order of the properties in a style declaration matter?

Yes, for the purpose of deciding between two values for the same property.  
See http://www.w3.org/TR/REC-CSS2/cascade.html#cascading-order

> I know that the order of the style declarations matter. What I'm asking is
> .test {left: 20px; right:30px; }
> Does the order of left and right matter?

In this case no, because they are separate properties.  If it was something 
like .text { left: 20px; left: 30px; }, the meaning would change if they were 

Watch out for shorthand properties though, such as border.  For instance, the 
colour of the border should change if these two border properties were 

	color: black;
	border: thick solid red;
	border: thin;

Jim Dabell
Received on Monday, 10 March 2003 07:26:05 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:02 UTC