Re: CSS2.1 Various Inline-related Stuff

Boris Zbarsky wrote:
> 
> > If you answered three, read part II of
> >   http://lists.w3.org/Archives/Public/www-style/2001Jun/0006.html
> 
> I answered three.  Then I read that mail.  Then I wondered yet again how
> :before and :after can possibly make any sense when applied to a
> replaced element, given that the CSS2 spec makes it pretty clear that
> the boxes generated by these pseudo-elements are children of the box
> generated by the element they are applied to.  Which is quite impossible
> for replaced elements, no?

Seems like it, but then there's 

http://www.w3.org/TR/2002/WD-CSS21-20020802/generate.html#content :
  | The rule below inserts the text of the HTML "alt" attribute before
  | the image. If the image is not displayed, the reader will still see
  | the "alt" text. 
  |
  |           img:before { content: attr(alt) }

which implies that it *is* possible.
Of course, this results in strange problems when trying to apply
'width' and 'vertical-align' to the image. It's not a well-defined
situation.

~fantasai

Received on Tuesday, 27 August 2002 11:55:36 UTC