Shadow Posted November 21, 2011 Share Posted November 21, 2011 OK, so a question mainly about the use of the id class and if something would be proper use or a bad practice as far as coding goes. In an attempt to streamline stuff even further I have been recoding my site and I have been thinking about adding an id tag to the body of some pages. This would of course allow me to set custom css for those specific pages.Examples:<body id="creatures"><body id="core-classes">etc, etc.. Or would it be more proper to just create an extra <div> with the id tags--or a class tag-- inside of the main content div for that section and go that way.Examples: (article being the primary container for that section with all the positioning/etc data for the container)<div id="articles"> <div id="creatures"> --insert content entry here-- </div></div> OR <div id="articles"> <div class="creatures"> --insert content entry here-- </div></div> I've read a few things on it and some seem to be for it and some against it but the articles I've found are fairly old so need some fresh thoughts on it. Link to comment Share on other sites More sharing options...
Ingolme Posted November 21, 2011 Share Posted November 21, 2011 I wouldn't add an extra <div> if I wanted to target one specific page. Giving the ID to the body is better. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.