Webforumz's RSS FeedRSS Webforumz RegistrationRegister Contact Webforumz StaffContact

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.


 Subscribe in a reader

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

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Aug 9th, 2006, 22:32
Junior Member
Join Date: Jul 2006
Location: London
Posts: 19
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2  
Old Aug 9th, 2006, 23: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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Aug 10th, 2006, 00:37
Junior Member
Join Date: Jul 2006
Location: London
Posts: 19
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Aug 15th, 2006, 00:34
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
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...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
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
Link should open in a daughter window jayaramgussy JavaScript Forum 0 Jun 25th, 2007 11:52
IE7 and parent.location not working? camer38 JavaScript Forum 5 Apr 24th, 2007 12:13
Why is it displaying a parent directory? seth7843 Starting Out 1 Apr 18th, 2007 11:13
Parent Child accesssing greenkhan ASP.NET Forum 1 Jun 20th, 2005 10:21


All times are GMT. The time now is 19:36.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8