Hi,
I've been having a discussion with work collegues about the best way to do something and we've come to a disagreement... so I thought I would see what you think.
Basically one side is saying that when creating their CSS its good to have lots of classes that can be used multiple times. E.g:
etc. Then it could be used like this:Code:flLeft{ float: left; } flRight{ float: right; } topMargin10{ margin-top: 10px; }
The other side of people say that that is just adding unnecessary mark-up which would have to be changed if the site ever got re-designed and it would be much better to have it all in the element class itself. E.g.Code:<p class="flRight">Some text goes here</p> OR <p class="mainText flRight">Some text goes here</p>
I hope that makes sense. So what do you think, which way do you think is the best way to do it?Code:p.mainText{ color: #000; font-size: 1em; float: right }
Thanks
Phil


Reply With Quote
Bookmarks