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

Re: replacing images with alt attribute text

From: Tim Bagot <tsb-w3-style-0001@earth.li>
Date: Sun, 26 Nov 2000 20:56:34 +0000 (UTC)
To: <www-style@w3.org>
Message-ID: <Pine.LNX.4.30.0011262047140.27305-100000@windle.hack>
At 2000-11-26T20:02+0100, Bjoern Hoehrmann wrote:-

> img {
>   display: none;
> }
>
> img:before {
>   content: attr(alt);
>   display: inline;
> }
>
> should to the trick. Is this the right way or isn't this possible at all?

I'm pretty sure that with display: none any :before or :after content
should also not be displayed - as suggested by the selector, it is still
to some extent part of the img element. Remember that display: none
*cannot* be overridden on descendants - I think I would expect this to
hold for pseudo-elements too. I don't think there's any nice way around
this, at least before CSS3.


Tim Bagot
Received on Sunday, 26 November 2000 15:56:48 GMT

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