View Single Post
Old 04-14-2013, 02:59 PM   #1
travger
Evangelist
travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.
 
travger's Avatar
 
Posts: 485
Karma: 270594
Join Date: Aug 2010
Device: palm tx, Windows7, Galaxy A5
I made a discovery, but should I use it?

I found that an element can have more than one class.

Like, when all paragraphs are indented and I want to remove indent from first paragraph then it's enough to add "first" to the existing p class
Code:
<p class="calibre1 first">
and
Code:
.first {text-indent:0}
to the css.

Result looks the same if I copy the normal paragraph class, change text-indent to 0 (and it's name) and then change p class in every first paragraph to the new name.

Or if I want one p to be exactly like others, only little bit smaller. Why should I create new class with only one difference from previous?

But is it safe to use, can most/all readers cope with it? If yes, then why is it so seldom used? Or is there some other reason why I see (mostly) that every h or p has only one class; maybe it won't convert well?
travger is offline   Reply With Quote