W3C home > Mailing lists > Public > www-style@w3.org > July 1999

Re: About selection on propierties based on itself (that is, propierties as selectors)

From: Bert Bos <Bert.Bos@sophia.inria.fr>
Date: Wed, 28 Jul 1999 19:17:13 +0200 (MET DST)
To: <www-style@w3.org>
Message-ID: <14239.14876.554671.904662@www43.inria.fr>
Ignacio Javier writes:
 > When you have something like:
 > 
 > whatever {margin-left:2em;margin:2pt}
 > 
 > ¿what margin applies to left, really?

Ah, that's an easy one: 2pt

Margin is a shorthand property, it sets four properties at once. The
above actually means:

    whatever {margin-left:2em}
    whatever {margin-top:2pt}
    whatever {margin-right:2pt}
    whatever {margin-bottom:2pt}
    whatever {margin-left:2pt}

So the first 'margin-left' is lost because the last one takes
precedence.



Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos/                              W3C/INRIA
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France
Received on Wednesday, 28 July 1999 13:17:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:53:59 GMT