|  06-25-2012, 06:45 PM | #1 | ||
| Zealot  Posts: 104 Karma: 22 Join Date: Jun 2010 Device: none | 
				
				Problems removing white space between paragraphs
			 
			
			Hi, I'm trying to remove the white space between paragraphs in my eBook. The Sigil FAQ tells me: Quote: 
 Quote: 
 Still nothing. Can anyone tell me what I'm doing wrong? I'm a bit of a novice at this, although I have used Sigil before to create an eBook ... but at that time I just left the white space as it was. Grateful for any help. Thanks! | ||
|   |   | 
|  06-25-2012, 06:58 PM | #2 | 
| Grand Sorcerer            Posts: 28,880 Karma: 207000000 Join Date: Jan 2010 Device: Nexus 7, Kindle Fire HD | 
			
			Would need to see a sample of the actual html code to see what may be going on for sure. That particular CSS won't get rid of all whitespace if there's something like: "<p> </p>" or "<p><br /></p>" throughout the code.
		 | 
|   |   | 
|  06-25-2012, 06:59 PM | #3 | |
| Zealot  Posts: 104 Karma: 22 Join Date: Jun 2010 Device: none | 
			
			Aha. I expect that's the problem, then. Here's an example of a sentence: Quote: 
 Thanks! | |
|   |   | 
|  06-25-2012, 07:03 PM | #4 | |
| Grand Sorcerer            Posts: 28,880 Karma: 207000000 Join Date: Jan 2010 Device: Nexus 7, Kindle Fire HD | Quote: 
  Get rid of the  <br /> so that it looks like: Code: p>O<small>NE EVENING, MANY YEARS</small> ago, I was travelling through south Iceland with two of my cousins. We stopped in the town of Vík to camp for the night. After pitching our tent at the campsite we decided to take a walk before turning in. It was in the middle of summer, so it was broad daylight even though it was late in the evening.</p> | |
|   |   | 
|  06-25-2012, 07:10 PM | #5 | 
| Zealot  Posts: 104 Karma: 22 Join Date: Jun 2010 Device: none | 
			
			Yes, but it's on every paragraph in the book, and there are hundreds, maybe even over a thousand.  Is there a way to avoid getting them in there in the first place, e.g. if I save as html or something? (This was pasted from Word.) | 
|   |   | 
|  06-25-2012, 07:20 PM | #6 | |
| Well trained by Cats            Posts: 31,249 Karma: 61360164 Join Date: Aug 2009 Location: The Central Coast of California Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A | Quote: 
  That is what Search and Replace is for. Search (NORMAL mode, All HTML):  <br /></p> Replace: </p> I guess that to be safe you should check for scene breaks BEFORE you do this search&replace COUNT (Normal, all HTML): <p> <br /></p> If it comes up Not found, this combo nation was not used. Note substitute <p class="<what you see>"> if your P tags have a common class | |
|   |   | 
|  06-25-2012, 07:26 PM | #7 | |
| Grand Sorcerer            Posts: 28,880 Karma: 207000000 Join Date: Jan 2010 Device: Nexus 7, Kindle Fire HD | Quote: 
   | |
|   |   | 
|  06-26-2012, 12:31 AM | #8 | 
| Wizard            Posts: 2,625 Karma: 3120635 Join Date: Jan 2009 Device: Kindle PW3 (wifi) | 
			
			moved
		 Last edited by roger64; 06-26-2012 at 06:04 AM. | 
|   |   | 
|  06-26-2012, 03:21 AM | #9 | |
| Guru            Posts: 657 Karma: 64171 Join Date: Sep 2010 Location: Kent, England, Sol 3, ZZ9 plural Z Alpha Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin) | Quote: 
 Code: <p> <br /></p> 1. Search for Code: <p> <br /></p> Code: <p class="scenebreak"> </p> 2. Search for Code:  <br /></p> Code: </p> In your css file add the following Code: p.scenebreak {margin-bottom: 0.5em;} | |
|   |   | 
|  06-26-2012, 04:57 AM | #10 | 
| frumious Bandersnatch            Posts: 7,570 Karma: 20150435 Join Date: Jan 2008 Location: Spaniard in Sweden Device: Cybook Orizon, Kobo Aura | 
			
			But you can't make it smaller than 1 line in that way. I'd leave the margin at 0 and change the "height" property instead.
		 | 
|   |   | 
|  06-26-2012, 05:12 AM | #11 | |
| Guru            Posts: 657 Karma: 64171 Join Date: Sep 2010 Location: Kent, England, Sol 3, ZZ9 plural Z Alpha Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin) | Quote: 
 A case of multiple ways to skin a cat. (poor Polly - avatar pic) | |
|   |   | 
|  06-26-2012, 05:29 AM | #12 | 
| frumious Bandersnatch            Posts: 7,570 Karma: 20150435 Join Date: Jan 2008 Location: Spaniard in Sweden Device: Cybook Orizon, Kobo Aura | 
			
			Then I'd use "height: 1.5em", that way all the space goes in a single place, and not split in height+margin (the final effect is the same, anyway   ) | 
|   |   | 
|  06-26-2012, 06:11 AM | #13 | 
| Zealot  Posts: 104 Karma: 22 Join Date: Jun 2010 Device: none | 
			
			Thanks for all the replies. I'm not sure what you mean by "scenebreak" - could you please clarify? I guess what I was asking originally was whether this problem has something to do with pasting from Word, or whether it also happens when the doc is saved as html. I gather that not everyone has this problem or it would be addressed in the FAQs, so what did I do to have this come up? Thanks! Alda | 
|   |   | 
|  06-26-2012, 06:29 AM | #14 | 
| Zealot  Posts: 104 Karma: 22 Join Date: Jun 2010 Device: none | 
			
			Another thing: when I look at this more closely I see that  <br /> is rare. Usually it's just the   In that case, is it a question of eliminating the   altogether? | 
|   |   | 
|  06-26-2012, 06:47 AM | #15 | 
| Color me gone            Posts: 2,089 Karma: 1445295 Join Date: Apr 2008 Location: Central Oregon Coast Device: PRS-300 | 
			
			  is just a non breaking space that means the words on either side and the space will always be displayed together.  Sometimes it can cause an extra space but not mostly. In code view you do a search and replace for   and replace it with a space from the spacebar generally without harm. In fact I nearly always do so to eliminate unexpected ends of lines. Try it and see what you have left. You may have to do a little detective work. Find a paragraph where you have the problem and look at the styles which applied to it in the stylesheet. You may have it surrounded in <div>s which cover more than one paragraph, so look up and down and see if you can find a <div> which starts above and doesn't end until below it. | 
|   |   | 
|  | 
| Thread Tools | Search this Thread | 
| 
 | 
|  Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| How to remove white space between paragraphs for iPad? | kabloooie | Conversion | 4 | 05-28-2012 05:11 AM | 
| Removing space between paragraphs in a Mobi book | HarryT | Conversion | 7 | 08-07-2011 10:42 AM | 
| space between paragraphs | gatorman | Sigil | 3 | 01-07-2011 10:17 AM | 
| How to reduce indents without "removing space between paragraphs" | Skydog | Calibre | 5 | 06-05-2010 12:58 AM | 
| Removing unwanted white space | JayLaFunk | Sigil | 4 | 03-19-2010 11:33 AM |