Thread: ePUB weight
View Single Post
Old 02-27-2015, 12:16 AM   #21
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,584
Karma: 79436940
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
The beauty of moving all the formatting into the stylesheet is that now, you can make changes in one place and affect the formatting throughout the book.

For instance, you might want to add an indent to all paragraphs, except those after a heading.

That can be done by the following CSS code in the stylesheet:
Code:
h2 + p {
  text-indent: 0;
}
and adding in
Code:
text-indent: 1em;
to the existing p definition in the stylesheet.

The new code says that for the first p following a h2 override the text-indent.
PeterT is offline   Reply With Quote