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

Re: vw/vh/vm units

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 10 Jul 2009 17:28:31 -0500
Message-ID: <dd0fbad0907101528k4b985890i5843966357a968b4@mail.gmail.com>
To: Aryeh Gregor <Simetrical+w3c@gmail.com>
Cc: www-style@w3.org
On Fri, Jul 10, 2009 at 4:59 PM, Aryeh Gregor<Simetrical+w3c@gmail.com> wrote:
> On Fri, Jul 10, 2009 at 3:51 PM, Tab Atkins Jr.<jackalmage@gmail.com> wrote:
>> <!DOCTYPE html>
>> <html><head>
>> <title>Test</title>
>> <style>
>> body {
>>        margin: 0;
>>        padding: 0;
>>        background: white;
>> }
>>
>> #test {
>>        background: blue;
>>        padding-top: 135.5%;
>> }
>> </style>
>> </head><body>
>> <div id="test"></div>
>> </body></html>
>
> You don't the <html><head>, </head><body>, </body></html> here, BTW.
> HTML 5 is great for brevity.  :)  Actually, this works just as well:
>
> <!DOCTYPE html>
> <title>Test</title>
> <style>
> html {
>    background: white;
> }
> body {
>    margin: 0;
>    padding-top: 100%;
>    background: blue;
> }
> </style>

Heh, reflex.  I started webdesign in XHTML1, though I ditched it for
HTML5 as soon as I could.  I also close my <li>s and <tr>s.  ^_^

Pretty cool that it's doable with <body>.  I don't usually depend on
<body> for anything - too much magic involved in displaying it.
Pretty awesome how minimal the example ends up being, though.

~TJ
Received on Friday, 10 July 2009 22:29:30 GMT

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