W3C home > Mailing lists > Public > www-style@w3.org > February 2010

Re: Question about inline layout and margins

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 23 Feb 2010 13:51:23 -0500
Message-ID: <4B8423AB.3010506@mit.edu>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: www-style list <www-style@w3.org>
On 2/23/10 1:43 PM, Tab Atkins Jr. wrote:
> Further confusion:
>
> <!DOCTYPE html>
> <div style="width: 100px; border: 1px solid green">
>   <span style="margin-right: 200px">X</span><span style="margin: 0 -10px">
>     <span style="display: inline-block; width: 20px">Text</span>
>   </span>
> </div>
>
> makes Gecko put "Text" flush with the green border.

Indeed.  I won't claim that Gecko's inline layout code makes sense (and 
I'm not sure anyone else will either).  Then again, no one else's seems 
to either, so that's good, right?  ;)

-Boris
Received on Tuesday, 23 February 2010 18:51:57 GMT

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