I'd like to use the ::before pseudoelement to insert some text that is found in another area of the HTML file.
My HTML:
<html>
<body notetext="Note">
...
<p class="bodytext">Don't press the red button!</p>
</body>
I can use content:attr to select an attribute of the current element, but is it possible to refer to an attribute of an ancestor element? Like you can in XPath, for example (//body/@notetext)
the non-working CSS I have:
p.bodytext::before {
content:attr(notetext);
}
I'm using Antennahouse Formatter, for CSS Paged Media.