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

replacing images with alt attribute text

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Sun, 26 Nov 2000 20:02:54 +0100
Message-ID: <005f01c057e1$da821470$c7e0a8c0@de>
To: <www-style@w3.org>
Hi,

I want to replace an image in an XHTML document with the associated alt text.
Since

img {
  content: attr(alt)
}

is no legal CSS2, I thougt something like

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?

regards,
--
Björn Höhrmann ^ mailto:bjoern@hoehrmann.de ^ http://www.bjoernsworld.de
am Badedeich 7 ° Telefon: +49(0)4667/981ASK ° http://bjoern.hoehrmann.de
25899 Dagebüll # PGP Pub. KeyID: 0xA4357E78 # http://www.websitedev.de/
  "Everything we see or seem is but a dream within a dream" - E.A. Poe
Received on Sunday, 26 November 2000 14:47:19 GMT

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