View Full Version : Removing unwanted white space


JayLaFunk
03-19-2010, 08:54 AM
Hi Valloric,

First of all thanks for your app been using for search & replace to clean up some ebooks but I have a few ebooks that I need to clean up and remove unwanted white spaces, I am opening them up in Sigil in code view and I'm trying to use the tip below but I can't see yellow color text in code view, this will prob be a very easy thing to do to for most people but I'm not that clued up to editing, could someone post a screen grab and show me how to do what I want...

Regards
Jay

To remove the white space between the paragraphs, add this to the bottom of the CSS code (the yellow color text in the Code View):

p {margin: 0; padding: 0;}

This will affect only the paragraph spacing. To remove all the whitespace between the various elements and make the document look more "book like", use this code:

body, div, p, h1, h2, h3, h4 { margin: 0; padding: 0; }

Valloric
03-19-2010, 09:36 AM
OK, which version of Sigil are you using? The 0.2.0 betas or 0.1.9?

The CSS code will probably be in a different CSS file if you're using 0.2.0. You should see a file in the "Styles" folder in the Book Browser.

JayLaFunk
03-19-2010, 09:50 AM
OK, which version of Sigil are you using? The 0.2.0 betas or 0.1.9?

The CSS code will probably be in a different CSS file if you're using 0.2.0. You should see a file in the "Styles" folder in the Book Browser.

Hi,

I am using 0.1.9 (Win 7), would I be better to upgrade to 0.2.0

Jay

theducks
03-19-2010, 11:29 AM
Hi,

I am using 0.1.9 (Win 7), would I be better to upgrade to 0.2.0

Jay

0.2 is very much Beta. There is a file name with spaces bug that will be corrected in the next release. Removing spaces from files inside the EPUB is a PITA :rolleyes: if there are very many splits.

roger64
03-19-2010, 11:33 AM
Beware, I am just a beginner on CSS. This time I succeeded to reduce the white space between paragraphs.

The epub text is coming from a foreign source and has been converted from an odt file by calibre as an EPUB .

I opened this epub file with Sigil 0.2, I looked at an xhtml file with code view and I identified the P11 paragraph style as being the most used (why? mystery?) : see joint texte.png on the right

I then opened the css stylesheet at P11 and reduced to zero the values of margin-bottom and margin-top which were set at 1em (all the others values related to margin and padding were already at zero): see joint style.png

That was enough to do the trick. :)

I am not sure at all this is academic but it works. Now I have one line between paragraphs instead of three.