View Single Post
Old 11-02-2012, 07:46 AM   #6
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 5,803
Karma: 4027751
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon
Quote:
Originally Posted by GraciousMe View Post
<p class="tom">&nbsp;</p>
Do not do that. You just want some vertical space, use vertical (top/bottom) margins, or a block element with fixed height. That's not a paragraph and there's no content to have there, don't add vertical space with "empty lines".

Margins of what? Block element...?
You have something like this:

Code:
<h1>Chapter Title</h1>

<p class="tom">&nbsp;</p>

<p class="tom">&nbsp;</p>

<div class="intro">
Short introductory text.
</div>

<p class="tom">&nbsp;</p>

<p class="first">First paragraph</p>
I'd recommend one if these (the first one is preferable):

Margins:

Code:
<h1>Chapter Title</h1>

<div class="intro">
Short introductory text.
</div>

<p class="first">First paragraph</p>
Code:
h1 { margin-bottom: 1.5em; }
div.intro { margin-bottom: 1em; }
Block element:

Code:
<h1>Chapter Title</h1>

<div class="big_spacer">&nbsp;</div>

<div class="intro">
Short introductory text.
</div>

<div class="spacer">&nbsp;</div>

<p class="first">First paragraph</p>
Code:
div.big_spacer { height: 2em; }
div.spacer { height: 1em; }
Jellby is offline   Reply With Quote