1

Possible Duplicate:
Is there a CSS parent selector?

Is it possible to have different pre style only for those pre tags, that have a code tag inside?

<pre>Lorem Ipsum</pre>

should be styled differently than

<pre><code>code</code></pre>

but on the pre element.

Community
  • 1
  • 1
ghislaineguerin
  • 111
  • 1
  • 4
  • This is called a "parent selector". CSS cannot do this (yet). You'd need to use JavaScript for this. – gen_Eric Feb 29 '12 at 18:54
  • 1
    Sadly no: http://stackoverflow.com/questions/1014861/is-there-a-css-parent-selector – Pat Feb 29 '12 at 18:55

0 Answers0