Closed Bug 425766 Opened 16 years ago Closed 16 years ago

CSS: 'content' property only works in pseudo-elements

Categories

(Core :: CSS Parsing and Computation, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 215083

People

(Reporter: rakoczyn, Unassigned)

References

()

Details

User-Agent:       Opera/9.26 (Windows NT 5.1; U; pl)
Build Identifier: 2.0.0.13 and 3.b4

'content' selector is only interpreted while used with pseudo-element ':before' or ':after'. While tag/class/id is 'clean', without those pseudo-elements, selector is ignored.

P.S. If you don't know what it's going on, open page and code from "Additional Information" in Opera Browser and Firefox. You'll see the difference.

Reproducible: Always

Steps to Reproduce:
1.
2.
3.



Webpage, where you can see the problem: 
http://www.w3schools.com/css/tryit.asp?filename=trycss_before

Example code:

<html>
<head>
<style type="text/css">
h1
{
content: "Doesn't work :("
}
</style>
</head>

<body>
<h1>This is a header</h1>
<p>
The :before pseudo-element can be used to insert some content before the content 
of an element.</p>
</body>

</html>
Component: General → Style System (CSS)
Product: Firefox → Core
QA Contact: general → style-system
Version: unspecified → Trunk
The "content" property only applies to :before and :after pseudo-elements.  See http://www.w3.org/TR/CSS21/generate.html#propdef-content
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
Summary: CSS: 'content' selector doesn't work properly → CSS: 'content' property only works in pseudo-elements
This should really be marked as a duplicate of the bug on implementing the css3 version of the content property.  That said, I don't think that's in CR yet.
Resolution: INVALID → DUPLICATE
You need to log in before you can comment on or make changes to this bug.