Thread: parent daughter
View Single Post
  #1 (permalink)  
Old Aug 9th, 2006, 21:32
maxelcat maxelcat is offline
Junior Member
Join Date: Jul 2006
Location: London
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy parent daughter

Hello again

Been attempting to get to grips using selectors that are daughters thus:

strong h3 {color:red;} etc

Now this works fine. If I use <h3> nested inside <strong> its red.

However, if I try this:

p h3 {color:red;} etc

it doesn't work.

The only difference that I can see is that <p> is a block level element and <strong> isn't. The text book I am using sets out an example using <p> as the parent.

Can anybody shed any light on why the p version doesn't work...

thanks
Reply With Quote