Re: [css3-box] padding: auto

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 UTC