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

Re: Styling anonymous container and child boxes

From: Matthew Brealey <webmaster@richinstyle.com>
Date: Mon, 13 Mar 2000 11:42:17 -0800
Message-ID: <38CD42F6.3E6B@richinstyle.com>
To: www-style@w3.org
L. David Baron wrote:
> 2) Backgrounds and borders on headers that do not span the width of
>    the page (this would deal with a common reason people want
>    shrink-wrap on blocks [3]):
>    h1:inside {
>      display: inline;
>      background: yellow;
>      color: black;
>      border: 3px solid green;
>      }

This can be dealt with using display: inline-block; the effect would be
exactly the same, except the H1 would be the inline block, and the
'outside' anonymous containing block box would be the spanning block

> 3) Describing the formatting of form buttons:
>    input[type=button] {
>      display: inline-block;
>      border: 3px outset #ccc;
>      background: #ccc;
>      color: black;
>      }
>    input[type=button]:focus:inside {
>      display: inline;
>      outline: 1px dashed black;
>      }

This does seem to be quite a major problem (all the others are 'This
would be nice', whereas this is a 'We need this to describe HTML'). The
outline of an inline block at present goes around the box; the way to
solve this without requiring this pseudo-element would be to say that
outlines on inline blocks go around the content of the inline block; for
example, they go around the text. However, this wouldn't allow outlines
around the block itself.

[Other issues snipped, with which I would concur, incidentally]

Please visit http://www.richinstyle.com
Featuring:  CSS bug guides (more than 1000 CSS bugs) CSS Masterclass
HTML 4 guide    CSS 1 guide    CSS 2 guide   Web-safe colorizer 
CSS bug table     More than 300 CSS test pages
Received on Monday, 13 March 2000 06:39:25 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:53 UTC