Forum Moderators: not2easy

Message Too Old, No Replies

Is referencing a parent element possible?

         

tmizas

2:49 pm on Dec 28, 2005 (gmt 0)



Is it possible to reference the parent element or container of another element.
ex:

<p>
<strong class="big-text">foo</strong>
</p>

is there a way to reference 'p' from .big-text?

Robin_reala

3:04 pm on Dec 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No, that's one of the limitations of CSS. It's done on purpose - it's far easier to make a engine that only has to crawl down a tree and not up it again. If it has to go up then you start having to code in infinite loop protection and other fun stuff like that.