![]() |
#1 |
Member
![]() Posts: 11
Karma: 10
Join Date: May 2014
Device: none
|
white space
When I check my book on nook there is a blank space between each and every one of my paragraphs and it looks bad. I can delete them one by one but that would take me forever because I have 28 chapters. Is there a way to add a code in html to do this for me? It's a epub and I'm using sigil to do the editing.
|
![]() |
![]() |
![]() |
#2 |
Village idiot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 157
Karma: 519566
Join Date: Mar 2014
Location: Belgium
Device: sony PRS T-1
|
Is it a CSS problem, or are there empty paragraphs or breaks between those paragraphs in the html file?
If its in CSS, you can change it to this: p { margin: 0; padding:0; } If it's in the html, you can use regex to remove those empty paragraphs or breaks. But I'm no good with regex :-) |
![]() |
![]() |
![]() |
#3 |
Member
![]() Posts: 11
Karma: 10
Join Date: May 2014
Device: none
|
It's in the html file. There is a blank space between the paragraphs.
|
![]() |
![]() |
![]() |
#4 |
Color me gone
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
It sounds like whoever did this did carriage returns in the source. If you have the source,you might be able to find and replace them there.
Lacking that, look at the code view and see what exists between the </p> at the end of the paragraph and the <p> at the start of the next one. You can copy the </p>whatever is in between<p> to find and replace it with </p><p>. Otherwise you can edit the stylesheet as suggested above to eliminate the space above. http://www.w3schools.com/css/css_margin.asp This has more about the css for the stylesheet. There is even a try it yourself so you can see the effect of various changes without messing up your epub until you understand what you need to do. |
![]() |
![]() |
![]() |
#5 |
Member
![]() Posts: 11
Karma: 10
Join Date: May 2014
Device: none
|
There is nothing between the paragraphs. It's just a blank space. So how do I use the find and replace tool to delete the blank spaces?
|
![]() |
![]() |
![]() |
#6 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Then it is a css problem; see post #2.
|
![]() |
![]() |
![]() |
#7 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
Dale |
|
![]() |
![]() |
![]() |
#8 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,160
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Code:
p { margin-top: 0; margin-bottom: 0; text-indent: 1.2em } Code:
body { oeb-column-number: 1; widows: 0; orphans: 0; margin-top: 0; margin-bottom: 0; margin-left: 0; margin-right: 0; text-align: justify } |
|
![]() |
![]() |
![]() |
#9 |
Color me gone
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
CSS=Cascading Style Sheet. It is the stylesheet which is part of your book. In the listing for p there may be several items enclosed in the {} brackets which control what the paragraph margin is at the top and what it is at the bottom.
See the listing above. If you open the book in sigil and look at the book browser, the style folder and style sheet will be all by itself. Click on it and study it, together with the above info along with the web site I pointed out to you. If there is no stylesheet, then the style information is located at the top of each file that makes up the book. You can check there too. Theoretically you could do both, but to avoid confusion, people either put the style information at the top of each text file, or they use a stylesheet to which all the text files refer. If it is at the top of each file, it will be enclosed with <style> tags, if I recall correctly. |
![]() |
![]() |
![]() |
#10 |
Member
![]() Posts: 11
Karma: 10
Join Date: May 2014
Device: none
|
In my style sheet there is no listing for p. I have some .MsoNormal listings and some .calibre listings. Should I add the p listing at the bottom of the stye sheet and put margin-top: 0; margin-bottom: 0; inside?
|
![]() |
![]() |
![]() |
#11 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,160
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
What do most of the paragraphs begin with? Is it <p or is it <div?
If it is <p, add in the code for p that I posted a few messages back. If it is <div, use the same CSS code for p that I posted and change p { to div { Also check what the class is next to the p or div. You might have to change that as well. For example, if you see <p class="msonormal"> or <div class="msonormal"> then change msonormal to have the same CSS as the p I posted above. Last edited by JSWolf; 06-17-2014 at 07:54 PM. |
![]() |
![]() |
![]() |
#12 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
CSS priority rules say that class (e.g. ".MsoNormal") selectors override type (e.g. "p") selectors. You will have to fix the .MsoNormal rules (assuming the margin was defined there) for anything to stick.
|
![]() |
![]() |
![]() |
#13 |
Village idiot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 157
Karma: 519566
Join Date: Mar 2014
Location: Belgium
Device: sony PRS T-1
|
|
![]() |
![]() |
![]() |
#14 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
At least some models of the Nook have issues with the shorthand notation. So, it is better to write them out. Ignoring can be one thing, misinterpreting another. Not that bad when the value is 0, but still.
|
![]() |
![]() |
![]() |
#15 |
Color me gone
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
It is not surprising you have having problems. You have Word leftovers plus Calibre leftovers. This can make it very hard to see what is affecting things.
It might be an interesting experiment to save the epub with another name, open it in Sigil, edit the stylesheet to remove everything it and save the epub, then open it in your Nook to see what the effect is. If the effect is more to your liking, you could add back bits of the stylesheet until you find just what is causing the problem. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
alternative character for white space | Jpax | ePub | 2 | 02-28-2014 03:28 AM |
White space inserted between paragraphs | TheBean | Sigil | 8 | 07-04-2013 08:04 AM |
Sigil Adding White Space? | beingnickb | Sigil | 20 | 07-31-2012 07:43 AM |
Tabs or White Space? | anamardoll | General Discussions | 57 | 06-13-2011 02:32 PM |