Thanks, Arlen.
Originally I was thinking that I should change my original HTML, from...
<div id="outer">
<div class="inner">
...to...
<div class="outer'>
<div id="inner">
...or...
<div class="outer">
<div class="inner">
...to make the selectors as simple as possible...
.outer a
#inner a
...or...
.inner a
.outer a
... but in retrospect, it makes more sense structurally for both outer
and inner to be IDs because in my example, there would be exactly one
outer and one inner in my page. So, once I realized (duh) that I could
simply target the inner class specifically through #outer .inner a,
the lightbulb came on.
I like this list.
Geoff
On Jan 24, 2008 3:40 PM, Arlen Walker <[EMAIL PROTECTED]> wrote:
>
> On Jan 23, 2008, at 10:06 AM, Geoffrey Hoffman wrote:
>
> > #outer { border:4px solid red; }
> > #outer a { color:red; }
> > .inner { border:4px solid green; }
> > .inner a { color:green; }
>
> The why has been answered well, but let me chime in. If you want it
> green, simply replace
>
> .inner { border:4px solid green; }
> .inner a { color:green; }
>
> with
>
> #outer .inner { border:4px solid green; }
> #outer .inner a { color:green; }
>
> and you'll have it green.
>
> Get used to the cascade and specificty rules, and you can create some
> interesting effects.
>
> Have Fun,
> Arlen
>
> ------------------------------
> In God we trust, all others must supply data
>
>
> ______________________________________________________________________
> css-discuss [EMAIL PROTECTED]
> http://www.css-discuss.org/mailman/listinfo/css-d
> List wiki/FAQ -- http://css-discuss.incutio.com/
> List policies -- http://css-discuss.org/policies.html
> Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
>
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/