Why # in CSS?
Why # in CSS?
Out of context: Reply #18
- Started
- Last post
- 33 Responses
- ********0
moth
nothing is to stop you from just using .class
but consider this....
you make a 3 column layout, for the sake of arguement....
so in your style sheet you define
#leftbit
#middlebit
#rightbitbear with me.....
then you decide that you want to format the main text areas for the whole page... so here you use a class which can be applied across ALL 3 of your IDs...
like
.headerTextFormat
.subHeaderTextFormat
.bodyTextFormatand so on...
by doing it this way you only need change one block of your css to affect all three columns and you have no need to define the text formatting in any of the 3 IDs...
you see??