Need help from CSS purist!
- by Darcy
I'm beginning to use CSS more and more but I'm not sure if I'm using it as intended in all cases.
I have classes named things like 'box' that will wrap the content inside it with a border, which seems like good CSS to me.
On the other hand I have classes like 'margin-right-5' and 'float-left' that sets the css to margin-right: 5px and float:left respectively. I'm wondering if this is good practice.
Then in my markup I'd do something like:
<div class="box float-left margin-right-5">
<!-- CONTENT HERE -->
</div>
Sometimes I may want to float right or not have a margin at all and still use the 'box' class, so I use several classes in order to make the css more flexible.
Am I destroying the principles of CSS?