Quote:
Originally Posted by chaot
[CODE]
I studied code & CSS - I understand everything but this:
Code:
p {whatever styling you want your standard (98% of the book) paragraph}
|
Books are mostly just regular paragraphs with no special styling. I estimated about 98% of a book has no special formatting. Therefore you can have a normal paragraph defined in the CSS and then only define classes for those few paragraphs that need special formatting.
Instead of:
Code:
<p class="normalpara">This is a normal paragraph.</p>
<p class="normalpara">This is a normal paragraph.</p>
<p class="normalpara">This is a normal paragraph.</p>
<p class="normalpara">This is a normal paragraph.</p>
<p class="red">This is a special paragraph.</p>
<p class="normalpara">This is a normal paragraph.</p>
<p class="normalpara">This is a normal paragraph.</p>
<p class="normalpara">This is a normal paragraph.</p>
CSS:
p.normalpara {margin:0; text-indent:1.2em; font-size:1em}
p.red {color:red}
You can have:
Code:
<p>This is a normal paragraph.</p>
<p>This is a normal paragraph.</p>
<p>This is a normal paragraph.</p>
<p>This is a normal paragraph.</p>
<p class="red">This is a special paragraph.</p>
<p>This is a normal paragraph.</p>
<p>This is a normal paragraph.</p>
<p>This is a normal paragraph.</p>
CSS:
p {margin:0; text-indent:1.2em; font-size:1em}
p.red {color:red}