W3C home > Mailing lists > Public > www-style@w3.org > December 2000

Re: width of content+padding versus border+margin

From: Roger Watt <rwwatt@ist.uwaterloo.ca>
Date: Fri, 15 Dec 2000 13:52:37 -0500 (EST)
To: www-style@w3.org
Message-ID: <Pine.SOL.4.21.0012151227170.6349-100000@ist.uwaterloo.ca>
> > I'm trying to create H2 output such that the content appears with a
> > background colour that occupies an area only moderately larger than the
> > content itself. 
[...]
> <style>
>   span {
>     display:inline;
>      background: #066; padding: 3pt;
>   }
> </style>
> 
> <H2><span>content</span><H2>

That works, but any approach that would require modifying all the source
documents is not an option.

From section 10.3.3, it looked like it should do what I want if I were to
specify border, padding, margin-left, and set margin-right to "auto". Am I
not reading that correctly?
Received on Friday, 15 December 2000 13:52:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:06 GMT