> > aside from the obvious reasons (ID's are declared only once, classes > > more than once) I'm interested to hear the lists opinion on the > > potential pitfalls of developing markup with CSS that uses > > only classes > > for layout purposes. > > in practice there is no real difference between id's and classes, as > browsers (well, FF & IE6) don't complain when multiple elements have the > same ID. Validators might, but that's beside the point.
That is really not beside the point.It is a matter of keeping your CSS code clean and maintainable. Clean CSS code with IDs for all elements that are once in the document and classes for all repeating elements is a lot easier to change and maintain. The clean structure of the XHTML should be reflected in the CSS. It is sad to see that instead of creating code for the future and readable for humans some developers still seem think the most important target is the browser. Oh, and yes; Scripts using the DOM and getElementById will fail, too. -- Chris Heilmann Blog: http://www.wait-till-i.com Writing: http://icant.co.uk/ Binaries: http://www.onlinetools.org/ ______________________________________________________________________ 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/