Closed Bug 582212 Opened 14 years ago Closed 14 years ago

::before and ::after not working on <video> and <img>

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 245633

People

(Reporter: rik, Unassigned)

Details

Attachments

(1 file)

Attached file Testcase
CSS 2.1 says "Note. This specification does not fully define the interaction of :before and :after with replaced elements (such as IMG in HTML). This will be defined in more detail in a future specification." [1]

CSS 3 Selectors says nothing new.


Opera 10.6: OK
Chrome 5: not working
Safari 5: not working


This will allow this kind of effect to work with every element : http://nimbupani.com/demo/css3-drop-shadows.html


[1] http://www.w3.org/TR/2009/CR-CSS2-20090908/generate.html#before-after-content
How is this different from bug 245633 ?
It's not.

Reporter, the reason this doesn't work is that :before and :after are _children_ of the element they're set on in CSS 2.1.  Adding children to an <img> does absolutely nothing; you can try doing that yourself using appendChild on the DOM.  What Opera is doing was a violation of the CSS2.1 spec until the "does not fully defined" weasel-wording was added.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: