- From: James Craig <work@cookiecrook.com>
- Date: Thu, 03 Jul 2003 16:06:20 -0500
- To: David Woolley <david@djwhome.demon.co.uk>, "www-style@w3.org" <www-style@w3.org>
David Woolley wrote:
> I think what you really meant here was something like (give or take
> a few punctuation characters, and choice of better names):
>
> img:broken {content: attr(myAlt); }
Now that Ian pointed out the proposed way to do it from the draft, I
think it's a better solution than either my suggestion or this previous one.
img { content: attr(src, url), attr(alt); }
Or perhaps:
img { content: attr(src, url), contents; }
Where img is:
<img src="foo.gif">Alt text</img>
However, a :broken pseudo-class would be useful in styling an element
different ways depending on whether or not the generated content is
displayed. For example, I may want a width or border specified on the
actual image, but not on it's text equivalent.
Though to play devil's advocate, :broken is getting into the realm of
semantics, too.
> img:broken:after {position: absolute; background-color: yellow;
> color: black; font-face:.....}
Oh of course; good idea. What about this though?
*[title]:hover:after {
content: attr(title);
position:absolute;
display:block;
}
Cheers,
James Craig
--
http://www.cookiecrook.com/
Received on Thursday, 3 July 2003 17:06:26 UTC