On Nov 10, 5:53 pm, nmiddleweek <[EMAIL PROTECTED]> wrote:
> Hello, Thanks for your help with this...
>
> Am I right in thinking that .widget input {} - references all INPUT
> elements within another element that have the class "widget" ?

Yes. Specifically, all INPUT elements that have an ancestor with a
class of ".widget". In the case of this:
    <div id="a"><div id="b"><span id="c"><input/></span></div></div>
elements "a", "b", and "c" are all ancestors of the INPUT. Setting a
class of "widget" on any of those will cause the rule to apply. There
is another notation that indicates applies only to the immediate
parent of the input, but that is not consistently implemented.

> How come you've put .widget button {}  ?  Why button ? I'm guessing
> there's a better way of me doing something?

In terms of semantic markup, BUTTON would be a better choice.

> Am I right in thinking elements in the DOM can and should be
> referenced by thinking about them in an OO way? And when creating
> elements and elements within elements, they too should be thought
> about in a similar way that objects are defined?

The DOM is an OO interface to the document and the CSS selectors are
queries into DOM tree.
Ideally, the markup should have just enough to make it clear the
relationship between different parts of the text. In practice, we
often wind up adding an additional div here and a span there to enable
us to achieve the presentation we desire.

http://en.wikipedia.org/wiki/Semantic_Web

> Cheers and thank again for your help!! I appreciate it!

Thank you for your appreciation. I, uh, appreciate it ;-)

--~--~---------~--~----~------------~-------~--~----~
--
You received this because you are subscribed to the "Design the Web with CSS" 
at Google groups.
To post: [email protected]
To unsubscribe: [EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---

Reply via email to