On Nov 8, 2013, at 4:30 AM, MiB wrote:

> 
> 8 nov 2013 03.09 Karl DeSaulniers:
> 
>> 
>> Ah I see. Well normally you wouldn't put an ID on the body anyways, you 
>> would put a class wouldn't you? That is if your trying to style it.
> 
> What's the logic behind choosing a class attribute here? Is it mostly for 
> semantic reasons? Semantically I can see the value of a class, provided that 
> you may have several other pages of the same class and you will treat them 
> similarly. This could be paginated pages or all pages under a certain 
> division of the site in question. I've used this in navigation for instance.
> 
> On the other hand each page is unique and if you want something specific for 
> that unique page you could use an id both on the body element or the html 
> element. 
> 
> I suppose your intentions would be made more clear in the css code if you 
> peruse the id and class attributes this way.
> 
> Then again, perhaps you had other reasons for this choice?

My logic behind using a class instead of the id is because of the lack of 
interference a class will have on a body tag, somewhat like what we are seeing 
here in this issue. I usually treat the html and body tags like reserved name 
spaces. I try not to touch them and if I must, I use a class to identify them 
or I just use the html {} or body {} css selectors. Now in the case of 
identifying a page, I guess I have never had a situation where I needed an id 
on a body tag to do this. I just Id the container div and go from there. But I 
am still learning so if I am wrong please let me know.

Karl DeSaulniers
Design Drumm
http://designdrumm.com
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to