On 12/2/05, Tony Crockford <[EMAIL PROTECTED]> wrote: > > why would you use id.class on an element (apart from the fact that it > doesn't work in IE) when giving a page element an id (consistent > throughout the site but unique per page - e.g footer) and adding a > class (declared by element in the stylesheet) works just as well. > > e.g > > on one page: > > <div id="footer"> > <p>some text</p> > </div> > > on another page > > <div id="footer" class="fancyfooter"> > <p>some different text</p> > </div>
Isn't ID more specific than class? So if #footer has font-size:1em; and then in .fancyfooter you try to override that with font-size:1.1em; it won't be overridden, because #footer has precedence? So doing: <div class="footer"> </div> and on another page: <div id="fancyfooter" class="footer"> </div> would be more bulletproof. -- -- Christian Montoya christianmontoya.com ... rdpdesign.com ... cssliquid.com ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
