- From: Alan Gresley <alan@css-class.com>
- Date: Wed, 18 Jan 2012 03:19:37 +1100
- To: "Kang-Hao (Kenny) Lu" <kennyluck@csail.mit.edu>
- CC: "Marat Tanalin | tanalin.com" <mtanalin@yandex.ru>, WWW Style <www-style@w3.org>
On 17/01/2012 12:20 AM, Kang-Hao (Kenny) Lu wrote: > (12/01/16 10:17), Alan Gresley wrote: >> So how does this overrule default margins [1] on block level elements >> or overrule the property 'margin'? > > As far as I can tell, margin-x/y are just shorthand properties (margin-x > for margin-left/right, margin-y for margin-top/bottom) so the overriding > rule seems quite clear. Can you make an example that this is not the case? <!DOCTYPE html> <style type="text/css"> h1 { font-size: 10em; background: silver; /* margin: 0.25em 0; */ margin-y: 0.25em; /* this can never overrule the property "margin" */ } </style> <h1>Text</h1> <p>Some more text</p> How is the property 'margin-y' going to overrule my default margin 'margin: 0.67em 0' which is found in the UA default style sheet? Here is the default style for the <h1> element for Gecko [1]? 1. http://mxr.mozilla.org/mozilla/source/layout/style/html.css#107 -- Alan Gresley http://css-3d.org/ http://css-class.com/
Received on Tuesday, 17 January 2012 16:20:19 UTC