parent daughter

This is a discussion on "parent daughter" within the Web Page Design section. This forum, and the thread "parent daughter are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 9th, 2006, 21:32
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

  #2 (permalink)  
Old Aug 9th, 2006, 22:31
Reputable Member
Join Date: Jul 2005
Posts: 400
Thanks: 0
Thanked 0 Times in 0 Posts
Re: parent daughter

h3 and p are both block level. You should never have either one inside the other....

h3 p = NO
p h3 = NO

strong is inline and can be used inside either.

h3 strong = YES
p strong = YES

strong h3 = NO
strong p = NO
Reply With Quote
  #3 (permalink)  
Old Aug 9th, 2006, 23:37
Junior Member
Join Date: Jul 2006
Location: London
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Re: parent daughter

Yes, that makes sense!

I was only experiementing and p was the first one I thought of!

Thanks
Reply With Quote
  #4 (permalink)  
Old Aug 14th, 2006, 23:34
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: parent daughter

That's not a CSS problem, that's an HTML problem. Those are no-no's. I hope the book doesn't prescribe that kind of experimentation...
Reply With Quote
Reply

Tags
parent, daughter

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Prodigal Daughter okose1 Introduce Yourself 8 Jun 1st, 2008 22:58
Link should open in a daughter window jayaramgussy JavaScript Forum 0 Jun 25th, 2007 10:52
IE7 and parent.location not working? camer38 JavaScript Forum 5 Apr 24th, 2007 11:13
Why is it displaying a parent directory? seth7843 Starting Out 1 Apr 18th, 2007 10:13
Parent Child accesssing greenkhan ASP.NET Forum 1 Jun 20th, 2005 09:21


All times are GMT. The time now is 04:31.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43