Yup that's it, it the long run it's all about reusability, which is a good thing....do more with less
There are a two main basic types of selector in CSS
for reusability you would use a class, as it can apply to many, referencing a style by id is if you just have one instance of that id.
you can also do some cool things like
Ideally all structural mark up should be just that, just content and structure, all styling wherever possible should be handled by css.
So if you want an image to have a 5px padding around it, but only if it is contained within a given tag by say id you could do something like:
Note that most box elements can also be styled thus:
Here's a
site I'm working on at the moment, the styles are entirely driven by CSS and the css is
here.You're more than welcome to rip any CSS off
The site's not finished yet so there are a few errors
As ecsyle has already pointed out:
http://www.w3.org/Style/CSS/The only reference you should need,
[ September 04, 2003: Message edited by: Zardoz ]