View Single Post
Old 05-19-2013, 04:13 PM   #480
Ripplinger
350 Hoarder
Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.
 
Ripplinger's Avatar
 
Posts: 3,574
Karma: 8281267
Join Date: Dec 2010
Location: Midwest USA
Device: Sony PRS-350, Kobo Glo & Glo HD, PW2
Quexos, if you're using Sigil, you might learn a lot about how the stylesheet.css file works if you open up an existing epub that you think is nicely formatted.

In your examples about using p or body, either style will work, but that style needs to be used within the body of the text. So if your epub text reads:

<p>This is a sample using p only.</p>

you must use a corresponding style in the stylesheet.css file for p such as:

Code:
p {
display: block; 
margin-top: 0;
margin-bottom: 0;	
margin-right: 0;
margin-left: 0;
text-align: justify;
text-indent: 1.5em;
}
Using a style for body will of course have no affect on the text since the text is set to use whatever you have defined for p.

If you set a style for p, there should be no . before the p in the stylesheet. Same goes for using body.

The elements that begin with a . are classes, so you could change

<p class="calibre1">This is a sample using p only.</p>

and have this added to your stylesheet.css file so the text would turn out in italics.

Code:
.calibre1 {
font-style: italic;
}
And the differences between html and css... to me css is using shortcuts to get your html to display the way you want it. Using html only, you would have to add all the various style information to each line and every page. With css, you link it to the html page and list each style only once there, and the html pages obey what you entered in the css sheet. This thread will probably explain the differences much better than I am.

Last edited by Ripplinger; 05-19-2013 at 04:26 PM.
Ripplinger is offline   Reply With Quote