Thread: blank line
View Single Post
Old 03-21-2012, 10:56 AM   #7
dwig
Wizard
dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.
 
dwig's Avatar
 
Posts: 1,613
Karma: 6718541
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
Quote:
Originally Posted by JSWolf View Post
In the XML...

Code:
<h2 class="chapter">Chapter One</h2>
In the CSS...

Code:
.chapter {
margin-top: 25px;
margin-bottom: 25px;
text-align: center
{
There you go, space at the top of the chapter heading and space at the bottom with the chapter heading centered.
If you don't use H2 for anything else in the document you could simplify the editing by not editing every chapter heading (omit the added class="chapter") and change the CSS style to:

Code:
h2 {
margin-top: 25px;
margin-bottom: 25px;
text-align: center
{
Personally, I prefer to spec the margin spacing relative to the current base font size by using em as the units.

Also, I prefer indented paragraphs in the body of the text with the first paragraph not indented. Since I have to style the first paragraph anyway, to change the indent, I use DiapDealer's method of adding space before the first paragraph instead of after the H2 heading, again prefering em units.
dwig is offline   Reply With Quote