Register Guidelines E-Books Search Today's Posts Mark Forums Read

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: 336
Karma: 43106
Join Date: Apr 2009
Location: Germany
Device: BeBook One, Pocketbook Touch
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
Advert
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,336
Karma: 2590360
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Dell Venue 8 Pro - Retired:Kindle 3, Clie UX50, T415, ...
"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
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,096
Karma: 7475002
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad mini, 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 online now   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,068
Karma: 9562279
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 02:49 AM.


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