Actually the one version that works across all browsers, is to simply call

div.home {....
instead of
div#holder.home {

If you want to access the #holder
call div#holder, otherwise just div.home

regards, Jens

On 4/27/07, james shannon <[EMAIL PROTECTED]> wrote:
> It should validate fine; it's a perfectly legal construction.
>
> One good reason for using it is to add specificity. div.home might be
> defined elsewhere, and div#holder.home is far more specific and thus
> will override it (thought I'd use other methods).
>
> Also useful when you have lots of pages and need to keep things
> separate. There's probably a <div id="holder" class="products">
> elsewhere on the site.
>
>
>
> I use something similar in that I have a container div that can have
> two different display settings: advanced and basic. So I define a
> bunch of stuff like:
>
> div#question.basic .advanced_options {display:none;}
> div#question.advanced .subquestion {color: red;}
> etc.
>
>
> james
>
>
> On Apr 27, 2007, at 2:33 AM, Austin Harris wrote:
>
> > Morning all,
> >
> > I am doing some work on a site that I haven't built and have found
> > something slightly strange...
> >
> > basis of html;
> >
> > <div id="holder" class="home">
> >
> > blah blah
> >
> > </div>
> >
> > css;
> >
> > div#holder.home {
> > styles...
> > }
> >
> > Strangely this does work across all the browsers I have (briefly)
> > tested on yet does cause validation errors.
> >
> > I can't see any issues as to why taking out the #holder from the
> > css will make any difference but was really more wondering why
> > someone would have done this in the first place...
> >
> > Austin
> > ______________________________________________________________________
> > css-discuss [EMAIL PROTECTED]
> > http://www.css-discuss.org/mailman/listinfo/css-d
> > IE7 information -- http://css-discuss.incutio.com/?page=IE7
> > List wiki/FAQ -- http://css-discuss.incutio.com/
> > Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
>
> ______________________________________________________________________
> css-discuss [EMAIL PROTECTED]
> http://www.css-discuss.org/mailman/listinfo/css-d
> IE7 information -- http://css-discuss.incutio.com/?page=IE7
> List wiki/FAQ -- http://css-discuss.incutio.com/
> Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
>


-- 
So long, and thanks for all the fish!
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to