W3C home > Mailing lists > Public > public-html@w3.org > July 2009

Re: Default margins for new elements

From: Olivier GENDRIN <olivier.gendrin@gmail.com>
Date: Wed, 22 Jul 2009 16:45:38 +0200
Message-ID: <e2c275120907220745p50084bb5wb8fbffe5805d3988@mail.gmail.com>
To: Simon Pieters <simonp@opera.com>
Cc: "public-html@w3.org" <public-html@w3.org>
On Sat, Jul 18, 2009 at 1:40 PM, Simon Pieters<simonp@opera.com> wrote:
> I set up a user style sheet with
> article, aside, figure, nav, section {
>  margin-top: 1em; margin-bottom: 1em;
> }
> taken from
> http://www.whatwg.org/specs/web-apps/current-work/multipage/the-xhtml-syntax.html#margins-and-padding
> Clearly, authors don't expect these elements to have default margins.
> I suggest that article, aside, nav and section not have default margins.
> figure has default margins on the left and right, so could keep the top and
> bottom margins too.
> dialog could maybe have default top and bottom margin, just like dl.

As a front-end web developer, I fully agrees with Simon, I consider
article, aside, figure, nav, section as semantic div (so margin: 0),
figure as a p (margin: 1em 0; perhaps a specific text-align: center;),
and dialog as a list (ul/ol/dl, so margin: 1em 0;). And all the french
tutorials about the new elements in HTML5 ([1][2]...) present the new
elements this way.

The side margin on figure could perhaps be more elastic (margin: 1em
10%;), but it's also logical to have the same value than li/dd.

[1] http://www.alsacreations.com/article/lire/750-HTML5-nouveautes.html
[2] http://romy.tetue.net/elements-html-5-de-structure

Olivier G.
Received on Wednesday, 22 July 2009 14:46:37 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:48 UTC