Re: [WSG] id or class on html or body
The id is in the body tag I first heard of the idea from Pete who works at Fairfax Digital, his presentation as a PDF from the June Sydney WSG meet is somewhere in the WSG resources section I have implemented the idea at a group of sites for a client where the navigation and layout are all the same, but they wanted the sites to have different colour schemes eg: http://www.heatstress.info/ - example of red http://www.collovet.com.au/ - example of blue http://www.algae.info/ - example of green -- Neerav Bhatt http://www.bhatt.id.au Web Development IT consultancy Mobile: +61 (0)403 8000 27 http://www.bookcrossing.com/mybookshelf/neerav Mordechai Peller wrote: Putting an id or class on the html or body tags is a useful way of targeting slight variations in style rules with resorting to a second style sheet. I remember seeing a discussion of the pros and cons, but I can't remember where. Does anybody have a link? Or perhaps the discussion can begin anew. Thanks * The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help *
RE: [WSG] id or class on html or body
Keep in mind that you can't have id or class attributes on the HTML element (not in xhtml, nor html4). Apply them to the BODY instead. Patrick Patrick H. Lauke Webmaster / University of Salford http://www.salford.ac.uk -Original Message- From: Mordechai Peller [mailto:[EMAIL PROTECTED] Sent: 09 July 2004 08:55 To: [EMAIL PROTECTED] Subject: [WSG] id or class on html or body Putting an id or class on the html or body tags is a useful way of targeting slight variations in style rules with resorting to a second style sheet. I remember seeing a discussion of the pros and cons, but I can't remember where. Does anybody have a link? Or perhaps the discussion can begin anew. Thanks. * The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help * * The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help *
Re: [WSG] id or class on html or body
CSS signatures ? Here http://archivist.incutio.com/viewlist/css-discuss/13291 On Fri, 2004-07-09 at 17:55, Mordechai Peller wrote: Putting an id or class on the html or body tags is a useful way of targeting slight variations in style rules with resorting to a second style sheet. I remember seeing a discussion of the pros and cons, but I can't remember where. Does anybody have a link? Or perhaps the discussion can begin anew. Thanks. * The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help * * The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help *
Re: [WSG] id or class on html or body
Patrick Lauke wrote: Keep in mind that you can't have id or class attributes on the HTML element (not in xhtml, nor html4). Apply them to the BODY instead. I checked, and your right, but since body can take both, that's the way to go. However, validity was only a minor part of my question, since I knew it could be done (though I was wrong about the html). My main question was (if you'll pardon the pun) is it good style to do so just to get the correct behavior from a menu, since, after all, I'm not using them to style the body at all (although I suppose I could). * The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help *
Re: [WSG] id or class on html or body
On 09/07/2004, at 5:55 PM, Mordechai Peller wrote: Putting an id or class on the html or body tags is a useful way of targeting slight variations in style rules with resorting to a second style sheet. I remember seeing a discussion of the pros and cons, but I can't remember where. Does anybody have a link? Or perhaps the discussion can begin anew. I use id and class attributes on the body all the time. I don't really like using them for something like body id='3-col-red' because that's a presentational thing (IMHO), but I do use it for something like body id='home', in which case I can target elements on #home separately to those on #about or #forum, which allows drastically different styling for each page. For me, it's a way of keeping my ids and classes as generic and minimal as possible, but still only using one stylesheet. The alternative (for my uses) is to have many stylesheets for each section, but this is an absolute pain, unless there are heaps of styles, in which case smaller stylesheets on deman seems much smarter. I know others use them to: - identify the domain (so others can easily override the stylesheets with a single user style sheet), but I *really* question how many people would bother to do this. eg body id='www-meyerweb-com' see http://www.meyerweb.com/ - trigger different layouts eg body id='col-SMX' see http://www.adaptivepath.com/ - trigger active and inactive tabs on a menu navigation (can't think of an example) Hope this gives you an idea or two :) --- Justin French http://indent.com.au * The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help *
Re: [WSG] id or class on html or body
On Saturday, Jul 10, 2004, at 02:37 Australia/Sydney, Justin French wrote: - trigger active and inactive tabs on a menu navigation (can't think of an example) http://www.alistapart.com/articles/slidingdoors/ http://www.alistapart.com/articles/slidingdoors2/ N ___ Omnivision. Websight. http://www.omnivision.com.au/ * The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help *