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

Re: [css3-box] padding: auto

From: Lea Verou <leaverou@gmail.com>
Date: Mon, 16 Jul 2012 18:44:57 -0700
Cc: www-style list <www-style@w3.org>
Message-Id: <95A3172F-1235-4C12-8E47-5D814FC7C611@gmail.com>
To: Brad Kemper <brad.kemper@gmail.com>
Did you take a look at the examples I listed? 
Iím talking about the case where multiple different backgrounds are required for multiple sections of the document and the author wishes to apply this kind of effect. Obviously, itís trivial to apply this effect to the entire page.

Lea Verou (http://lea.verou.me | @LeaVerou)

On Jul 16, 2012, at 18:30, Brad Kemper wrote:

> HTML already has two elements per page to work with, so that you can acheive that effect with something like this:
> 
> <style> 
> html { 
>     background: -webkit-linear-gradient(black,white);
>     /* or whatever */ 
>     min-height: 100%;
> } 
> body { 
>     background:white; 
>     border:1px solid red; 
>     margin:10 auto; 
>     max-width: 40em; 
>     min-height:30em;
> } 
> </style>
> 
> I don't know why the auto margins don't seem to work in standards mode. At least, not in webkit. It does work in quirks mode quite well. 
Received on Tuesday, 17 July 2012 01:45:37 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:56 GMT