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.
|
|
|
|
|
![]() |
||
parent daughter
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
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 |
|
|
|
|||
|
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 |
|
|||
|
Re: parent daughter
Yes, that makes sense!
I was only experiementing and p was the first one I thought of! Thanks |
![]() |
| Tags |
| parent, daughter |
| Thread Tools | |
|
|
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 |