Quote:
Originally Posted by Tempest
Why use XHTML strict?? I was going to try and do that but found it too limiting for me and so I've been using XHTML Transitional and am VERY happy with the results I'm getting. I've been validating all my pages as I do them until I'm very proficient at it.. (pretty much there now but it still helps as it catches errors).
The one thing I don't understand with CSS is the difference between using "#" or ".". My understanding is that # is used only for items that will be used once on the page and you set the id= parameter.. the other is for a "class" which can be used multiple times... So why not just make everything a class and then you don't have to worry about it? I've noticed some sites get it wrong where they define something using # and then use it in multiple locations.
|
Firstly.... strict is what i recomment for xhtml and for html as it is the closest to "standards compliant" that it will get. It means that even IE (yes, the devil browser) will try it's damnedest to be compliant and display your CSS the way that it's meant to be displayed.
If you don't do a ton of less compatible stuff, then transitional would be quite fine as it sort of interprets things as best it can without being... well, strict.
Secondly, ID's and classes are meant to be used as if it were chapters and volumes in a novel. An ID for an area, such as "rightcolumn" that would only ever be set once, and then classes within it that might be used over and over within that "volume".
But yes, I agree... it really would make sense to just use classes all the time really. It would work just as well.
Someone somewhere along the way decided on "structure" and chose ID's and classes.