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

Re: Text-Decoration

From: L. David Baron <dbaron@fas.harvard.edu>
Date: Sun, 2 Apr 2000 22:19:45 -0400 (EDT)
To: www-style <www-style@w3.org>
Message-ID: <Pine.OSF.4.10.10004022210210.31608-100000@is03.fas.harvard.edu>

On Fri, 31 Mar 2000, Tim Bannister wrote:

> Consider this:
> H1 { text-indent: 4em; }
> 
> <h1>
>  <object data="/images/corporate_logo">
>   Bodgitt and Scarper Plumbing
>  </object>
> </h1>
> 
> ...should the logo be indented?

Yes, if the object element has 'display: inline' and is thus a replaced
inline element within the h1 element's line box.  If the object element
is instead a block, the image is not indented.  However, if the text is
shown instead of the image, it would be indented since 'text-indent' is
inherited.  See [1].

> Also, if the style attribute of the <h1> element were
> "text-align: right" instead, should the logo be aligned to the right?

Ditto.  See [2].

-David

[1] http://www.w3.org/TR/REC-CSS2/text.html#propdef-text-indent
[2] http://www.w3.org/TR/REC-CSS2/text.html#propdef-text-align

-- 
L. David Baron    Sophomore, Harvard (Physics)    dbaron@fas.harvard.edu
Links, SatPix, CSS, etc.     <URL: http://www.fas.harvard.edu/~dbaron/ >
WSP CSS AC                      <URL: http://www.webstandards.org/css/ >
Received on Sunday, 2 April 2000 22:19:47 GMT

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