If I have class names such as ‘left’, ‘right’, ‘clear’ and xhtml like
<a href='index.php' class='right continueLink'>Continue</a>
With CSS like
.right { float: right; }
I know it’s not a semantic name, but it does make things much easier sometimes.
Anyway, what are your thoughts?
I don’t think that’s a very good idea. Now when you (or a future maintainer) go to change your website layout, you’ll either have to change
.rightto{float:left;}(obviously a bad idea) or go through all your HTML files and changerighttoleft.Why do you want that particular link to be floated right, and the other
.continueLink‘s not to? Use the answer to that question to choose a more descriptive class name for that link.