Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 02-29-2012, 08:11 AM   #1
kakkalla
Zealot
kakkalla doesn't litterkakkalla doesn't litter
 
kakkalla's Avatar
 
Posts: 143
Karma: 194
Join Date: Jun 2010
Location: Melbourne
Device: iPad
Add space between <br> tag

Hi there. I would like to add some space above some paragraphs in an ebook that I have converted to epub.

In the attachment Screen1, there is space above the paragraphs:

Two months before ...
We know Jay ..

I would like the same space above the paragraphs that follow:

Works for Hamlyn ...
Professionally ... etc.

Screen2 shows the tags via the Inspect feature of calibre.

Screen3 shows the entry for calibre8 in the css file.

It is obviously the fact that there is a <br> tag in there and not a <p> tag that prevents me from adding the space as I normally would by changing the margin-top setting for calibre8.

Is it possible to add space above the <br class="calibre3"> style?

I tried entering:

br{
line-height: 0.5em;
}

in the css file but it doesn't seem to work. Any ideas?

Thanks in advance
Attached Files
File Type: pdf Screen1.pdf (56.5 KB, 218 views)
File Type: pdf Screen2.pdf (26.5 KB, 256 views)
File Type: pdf Screen3.pdf (17.5 KB, 242 views)
kakkalla is offline   Reply With Quote
Old 02-29-2012, 09:28 AM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,812
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Line-height is between ALL LINES inside a paragraph (<br /> is not a line )

<p>The first phrase <br />The second phrase</p>

Margin-bottom, Margin-top are between paragraphs (and my preferred way for most cases)

<p>The first phrase </p>
<p>The second phrase</p>
theducks is offline   Reply With Quote
Advert
Old 02-29-2012, 10:18 AM   #3
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, ...
I also avoid using <br> for this type of formatting. I use a style for the first paragraph following a section break:
<p>stuff</p>
<p>and</p>
<p class="section">more</p>
<p>stuff</p>


with these styles:
p {margin-top: 0em}
.section {margin-top: 1em}

yields:
stuff
and

more
stuff
dwig is offline   Reply With Quote
Old 02-29-2012, 10:32 AM   #4
Rob Lister
Fanatic
Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.
 
Posts: 532
Karma: 3293888
Join Date: Oct 2011
Location: Virginia
Device: Nook Simple Touch
I can't figure out why the op wants the paragraphs and their associated dialog formatted that way so I feel I must be missing something important <br class="confused" />

there's not enough in attach1 to see the overall style being used here, but what is presented looks jumbled.

1) Space between paragraphs, or not?

2) Indent paragraphs or not.

If 1 is true then 2 can be true of false.
If 1 is false then 2 should certainly be true.

The br tag is an awkward (and certainly counter-semantically) why of achieving either.

Last edited by Rob Lister; 02-29-2012 at 10:37 AM.
Rob Lister is offline   Reply With Quote
Old 02-29-2012, 10:57 AM   #5
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Aren't extraneous <br /> tags often ignored by ADE anyway?
DiapDealer is offline   Reply With Quote
Advert
Old 02-29-2012, 04:29 PM   #6
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, ...
Quote:
Originally Posted by DiapDealer View Post
Aren't extraneous <br /> tags often ignored by ADE anyway?
Yes, ADE ignores some <BR> tags and using a <BR> in a centered paragraph usually produces one of ADE's many problems with centering.
dwig is offline   Reply With Quote
Old 02-29-2012, 05:16 PM   #7
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,812
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by DiapDealer View Post
Aren't extraneous <br /> tags often ignored by ADE anyway?
There is some mis-information here.
A single <br /> works just fine with ADE on my PEz
A <h3 class="is_one _centered">Chapter 1 <br />The Beginning</h3>
Also works with both lines.
Note: I see the H3 tag have an indent, then centered. The second line looks like crap.
theducks is offline   Reply With Quote
Old 02-29-2012, 07:45 PM   #8
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
There is some mis-information here.
A single <br /> works just fine with ADE on my PEz
But that wouldn't be an extraneous <br /> then, would it?

Yes, ADE will honor a <br /> tag and start a new line, but a second one—in an attempt to create a "blank" line—will be ignored.

I just meant that using the <br /> tag to do anything other breaking to a new line is probably not going to have the desired result in ADE. There needs to be something to "break," first and foremost.
DiapDealer is offline   Reply With Quote
Old 02-29-2012, 10:19 PM   #9
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, ...
Quote:
Originally Posted by theducks View Post
There is some mis-information here.
A single <br /> works just fine with ADE on my PEz
A <h3 class="is_one _centered">Chapter 1 <br />The Beginning</h3>
Also works with both lines.
Note: I see the H3 tag have an indent, then centered. The second line looks like crap.
The behavior I see with centered <p> tags (<p class="center>) containing a break is that if the .center style explicitly sets text-indent: 0; and the default <p> tag sets text-indent: 1em; then the second line, the text after the<br />, is indented and centered leaving it out of alignment with the pre-<br /> text. It behaves as if it is generating an on-the-fly <p> for the second half of the text and using the <p> tag's formatting for text-indent instead of inheriting it from the style applied to the <p> tag containing the <br />. For me, this has always happened when the <p> contains <img> tags before and after the <br />.
dwig is offline   Reply With Quote
Old 02-29-2012, 11:02 PM   #10
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,812
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
I don't use naked <p>'s anywhere I care about
theducks is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
add new tag field Mister_R Library Management 2 08-02-2011 12:13 PM
How to add a tag? TdeV Calibre 10 06-20-2011 03:11 PM
Add a space after periods prhammer Conversion 3 05-13-2011 06:51 AM
Tag on Add Gazerwolf Calibre 4 09-02-2010 11:54 AM
Add a LaTeX Tag Nathan Campos Feedback 0 12-31-2009 02:47 PM


All times are GMT -4. The time now is 04:38 AM.


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