Quote:
Originally Posted by Pyrofire
how do i join 2 classes into a single one?
|
To match an element that must have two class names, you would use the code shown below.
Code:
.className1.className2 { /* declarations */ }
Do note that this CSS feature is not supported in Internet Explorer 6. My memory is hazy, but I believe that the above rule would match all elements with
.className2, regardless of whether or not they are also in
.className1, in that browser.
Quote:
Originally Posted by Pyrofire
like say i've got..
.strRed { color:red; }
.bgBlack { background:#000; }
|
Presentational class names are bad. If you’re going to do that, you may as well just put the CSS inline with the HTML or not use CSS at all, since you’ll end up having to change both the CSS selector and HTML
class attribute every time that you want to change the presentation. Use class names that describe content, not presentation.