I've just noticed something strange in Firefox 1.0: it seems that the
:after pseudo-element doesn't work as well as it used to.
Have a look at: http://www.relinquiere.com/test1.html
This is a simple list (ul) of images: I would like to display the titles
of these images using generated content, so I used a simple rule:
img:after { content: attr(title) ; }
but this doesn't work.
:after is still understood, though, as you can see at
http://www.relinquiere.com/test3.html where I generate a fixed string
after the li element. This works.
The cause is not the dynamic generated content either: in
http://www.relinquiere.com/test4.html, I use content: attr(title) on the
li element and it still works.
In http://www.relinquiere.com/test2.html, I tried to generate a fixed
string after the img, to no avail. So the problem seems to come from
mixing :after and generated content on the img element...
Isn't it weird? Or am I doing something wrong? All this used to work up
to Firefox 0.8 (and it still works in Opera 7), so is it a bug in Firefox?
As a sidenote, in test3 and test4, I display the generated content using
the "block" mode, but it appears just next to the image. I would expect
it to be under the image (or the li), as it used to...
Thanks for your help,
Vincent.
--
Want to spend holidays in France ? Check http://www.relinquiere.com/
:after pseudo-element doesn't work as well as it used to.
Have a look at: http://www.relinquiere.com/test1.html
This is a simple list (ul) of images: I would like to display the titles
of these images using generated content, so I used a simple rule:
img:after { content: attr(title) ; }
but this doesn't work.
:after is still understood, though, as you can see at
http://www.relinquiere.com/test3.html where I generate a fixed string
after the li element. This works.
The cause is not the dynamic generated content either: in
http://www.relinquiere.com/test4.html, I use content: attr(title) on the
li element and it still works.
In http://www.relinquiere.com/test2.html, I tried to generate a fixed
string after the img, to no avail. So the problem seems to come from
mixing :after and generated content on the img element...
Isn't it weird? Or am I doing something wrong? All this used to work up
to Firefox 0.8 (and it still works in Opera 7), so is it a bug in Firefox?
As a sidenote, in test3 and test4, I display the generated content using
the "block" mode, but it appears just next to the image. I would expect
it to be under the image (or the li), as it used to...
Thanks for your help,
Vincent.
--
Want to spend holidays in France ? Check http://www.relinquiere.com/
Comment