Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 10-30-2011, 04:51 PM   #1
NASCARaddicted
Addict
NASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and grace
 
Posts: 340
Karma: 43106
Join Date: Apr 2009
Location: Germany
Device: BeBook One, Pocketbook Touch, Pocketbook Touch HD
Creating an empty line - which way is better?

Hello

I want to hear your opinions about the following:

From time to time, some books have an empty line between 2 paragraphs, especially, when there is a scene break or a big span of time.

In the past, I did that with
Code:
<p>&nbsp;</p>
But recently I got an epub book from the internet and when I looked at the code, I noticed that this one used a different way. In this one, an empty line was created with css, using "margin-top 1.3em". (the line height was set to 130%)

So now I am thinking about which way is better? I think if I use nbsp, the empty line is still there, even if the css file gets lost. But are there also some disadvantages? Is there an advantage if I use margin-top?

Thanks in advance.
NASCARaddicted is offline   Reply With Quote
Old 10-30-2011, 07:01 PM   #2
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: 6718479
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
"better" is a value judgement you have to make for yourself, but...

... for scene breaks, I prefer to add a style that has an increased top margin. I typically use one named "p.section" or just ".section" that is a dupe of my base "p" style with a top margin set to 1em instead of 0em. I then simply style the first paragraph after a scene break. Placing this in the CSS stylesheet makes is easy to manage and alter if desired. Similarly, I create a style for the first paragraph in a chapter that does the same, though often a 2em top margin, and also sets the text-indent to 0em instead of the 1em I use for the base p style.

Typically:
Spoiler:

p {
text-indent: 1em;
margin-top: 0em;
text-align: justify;
margin-bottom: 0em;
}
.first {
text-indent: 0em;
margin-top: 1em;
margin-bottom: 0em;
text-align: justify;
}
.center {
text-indent: 0em;
margin-top: 0em;
margin-bottom: 0em;
text-align: center;
}
.section {
text-indent: 1em;
margin-top: 1em;
margin-bottom: 0em;
text-align: justify;
}
dwig is offline   Reply With Quote
Advert
Old 10-31-2011, 03:12 AM   #3
Adjust
Addict
Adjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel is
 
Adjust's Avatar
 
Posts: 351
Karma: 70000
Join Date: Jul 2010
Location: Australia
Device: ADE, iPad
Yeah I do what dwig said as well...
Adjust is offline   Reply With Quote
Old 10-31-2011, 03:46 AM   #4
AlexBell
Wizard
AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.
 
AlexBell's Avatar
 
Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
Quote:
Originally Posted by Adjust View Post
Yeah I do what dwig said as well...
So do I.

I think the main advantage is that if an author or editor wants the 'scene break' to be two lines instead of one then it is the work of seconds to change the style sheet and this automatically changes the distance between the paragraphs.

If it is done by using <p>&nbsp;</> then one would have go through and find every <p>&nbsp;</> and change it to <p>&nbsp;</><p>&nbsp;</>

A lot more work, and nowhere near as elegant.
AlexBell is offline   Reply With Quote
Old 10-31-2011, 05:24 AM   #5
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: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Either use a paragraph style with additional top (or bottom) margin, or a specifically styled empty <div> or <p> (or even <hr/>):

Code:
<p>... some text.</p>

<div class="break" />

<p>Text after the scene break...</p>
Some readers might discard the empty <div>, so you can also put an &nbsp; inside. Now you can style it as you wish:

Code:
div.break {
  height: 2em;
  margin: 0;
  padding: 0;
}
or have a few asterisks inside, or some border...
Jellby is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Spine is empty? artbatista Conversion 44 07-01-2012 02:37 PM
Am i creating HQ line art the right way? Stodder Kindle Formats 1 05-26-2011 12:34 AM
Empty Books philandjan Library Management 8 03-11-2011 06:03 PM
Word Wrap and Creating Line breaks for paragraphs? mjt57 Calibre 3 01-03-2011 10:14 PM
Bebook is empty Lake person BeBook 15 08-30-2009 02:09 PM


All times are GMT -4. The time now is 08:44 AM.


MobileRead.com is a privately owned, operated and funded community.