Wrox Programmer Forums
BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3
This is the forum to discuss the Wrox book Beginning CSS: Cascading Style Sheets for Web Design by Richard York; ISBN: 9780764576423
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 22nd, 2005, 12:53 PM
Registered User
Join Date: May 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Direct Child Selector Question - P86-87

Newbie here - plz forgive protocol transgressions.
I originally misunderstood the Direct Child topic fairly completely. After carefully writing my question here, the answer came to me. Funny how that works. (Usually I have to hit submit before it all becomes clear.) I have now revised the question below to state my newfound assumptions about how Direct Child Selectors work. Perhaps someone could validate this for me, as it is still not firm in my mind. Thank you.
On p86, the direct child selector example has this selector: form > div > label to apply the rule float: left;.<br>
Based on the example at the top of p86, I (now) understand "direct child" and "immediate child" to mean, in this example, an immediately subordinate occurence of a div element within a form element, and within that div, an immediately subordinate occurence of a label element. Furthermore, to be a direct, or immediate child, there must be no "open" elements between the parent and child. The example (p86 top) has the strong element "breaking the chain" (my term) by being between the h2 and em elements, and by still being in effect (open, not closed) when the em element occurs. <br>
In the Try It Out, (p87) the h2 which appears between the form and div elements does not break the chain between the form and the div because the h2 is closed before the div occurs. Whew. <br>
Additionally, the subsequent divs in the example on p87 are affected because all subordinate divs (not just the first one, like I originally thought)are affected. And that's why all the divs are floating left in FF (not IE).

Mike Roberts
Software Carpenters, Inc
Old May 22nd, 2005, 04:48 PM
richard.york's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts

Sounds like you've got it! :-)


Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design

Similar Threads
Thread Thread Starter Forum Replies Last Post
theme selector rav BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 February 12th, 2007 12:44 AM
more direct Question, need help kgoldvas XSLT 1 January 24th, 2006 09:14 AM
Mdi Non-Child Form Question GeneralDisorder Pro VB.NET 2002/2003 3 December 30th, 2004 07:10 PM
Slot Selector motupally Classic ASP Basics 0 July 28th, 2003 05:03 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.