Re: vertical-align content-generated image?

* Ian Hickson wrote:
>> #q:before {
>> 	content: url(image.gif);
>> }

>> How do I vertical-align the image?

>In the relevant CSS3 module, I would hope to see some way of specifying
>the content of replaced elements, which would go some way towards fixing
>this. Do you have any syntax ideas? That would be most helpful...

I think one approach to this could be to introduce an optional second
argument to the content property like

   #q:before { content: url(image.gif), myImage }

and some selector to select this generated content, e.g.

  ::generated-content(myImage) { vertical-align: "somewhere ;-)" }

I think this could be easily implemented if the user agent uses a DOM
structure to represent the current document and simply adds a new img
node (if in an XHTML document) before the selected element. The
generated content then is just another element that could easily be
Björn Höhrmann { }
am Badedeich 7 } Telefon: +49(0)4667/981028 {
25899 Dagebüll { PGP Pub. KeyID: 0xA4357E78 }

Received on Wednesday, 23 May 2001 20:08:19 UTC