![]() |
#1 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75
Karma: 77598
Join Date: Apr 2010
Device: Sony PRS-650, Hanvon h516, Kobo Aura HD
|
ePub with bad margins
I converted a number of books using Sigil from HTML to epub.
One has been giving me issues. It displays fine in Sigil (and Calibre and EPUBReader) but when it displays on my PRS-650 it has margins about an inch wide on each side with only about an inch of text in a column down the middle of the screen. Any idea how I can fix this? Or where I should look for the problem? Cheers, David |
![]() |
![]() |
![]() |
#2 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 48
Karma: 1916
Join Date: Sep 2010
Device: Cybook Opus
|
Code view -> look for the paragraph and/or the <body> class in the xhtml file(s), then look for the class definition in the CSS; see there if there something wrong in the
Code:
margin- If you can't spot the problem on your own, post here the relevant part of the xhtml/css files/definitions. BTW: this is actually not very Sigil- concerning ... ![]() |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,891
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
![]() You may have margins specified in inches (or other large fixed units) Note that the margins may also be compounding. You may have any of these: a Page margin, Body margin, a Div margin, a Paragraph margin. They nest ![]() Then there are Blockquotes ![]() |
|
![]() |
![]() |
![]() |
#4 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75
Karma: 77598
Join Date: Apr 2010
Device: Sony PRS-650, Hanvon h516, Kobo Aura HD
|
THis is the data at the top of all the sectionxxxx.html files:
<?xml version="1.0" encoding="utf-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <meta content="OpenOffice.org 3.0 (Win32)" name="GENERATOR" /> <meta content="0;0" name="CREATED" /> <meta content="20100805;22515900" name="CHANGED" /> <style type="text/css"> /*<![CDATA[*/ <!-- @page { margin: 2cm } P { margin-bottom: 0.21cm } H1 { margin-bottom: 0.21cm } H1.western { font-family: "Arial", sans-serif; font-size: 16pt } H1.cjk { font-family: "Lucida Sans Unicode"; font-size: 16pt } H1.ctl { font-family: "Tahoma"; font-size: 16pt } H2 { margin-bottom: 0.21cm } H2.western { font-family: "Arial", sans-serif; font-size: 14pt; font-style: italic } H2.cjk { font-size: 14pt; font-style: italic } H2.ctl { font-size: 14pt; font-style: italic } H3 { margin-bottom: 0.21cm } H3.western { font-family: "Arial", sans-serif } --> h3.sgc-3 {text-align: left} h2.sgc-2 {text-align: center} h1.sgc-1 {text-align: center} /*]]>*/ </style> </head> <body dir="ltr" style="" xml:lang="en-US" xmlns:xml="http://www.w3.org/XML/1998/namespace"> <h3 class="western sgc-3" id="heading_id_4" style="text-align: center;">Chapter One</h3> <p>In the dark a child was crying.</p> It has a margin setting but surely it's commented out? I can't find a file with css in it. |
![]() |
![]() |
![]() |
#5 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,891
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
![]() (Never trust them to do it your way ![]() |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75
Karma: 77598
Join Date: Apr 2010
Device: Sony PRS-650, Hanvon h516, Kobo Aura HD
|
You think the device is defaulting rather than ignoring the commenting?
Whichever it is, it's poor. |
![]() |
![]() |
![]() |
#7 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
I'm not sure it's commented out. It's between HTML comments (<!-- -->), but it's CSS code after all, and in CSS code comments should be between /* */.
|
![]() |
![]() |
![]() |
#8 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75
Karma: 77598
Join Date: Apr 2010
Device: Sony PRS-650, Hanvon h516, Kobo Aura HD
|
Doesn't it have both?
|
![]() |
![]() |
![]() |
#9 |
Reader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 520
Karma: 24612
Join Date: Aug 2009
Location: Utrecht, NL
Device: Kobo Aura 2, iPhone, iPad
|
It is not commented out. The CSS in in a CDATA section so the <!-- is not an HTML comment but just those 4 characters (having no meaning in CSS).
|
![]() |
![]() |
![]() |
#10 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75
Karma: 77598
Join Date: Apr 2010
Device: Sony PRS-650, Hanvon h516, Kobo Aura HD
|
I'm getting a hint as to why it displays differently in different circumstances ...............
So what should I do? Get rid of all the confusing comments and set the margin to 0? |
![]() |
![]() |
![]() |
#11 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,891
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
If your commented out styles, was effctive, your Browser supplies the defaults . See http://www.w3.org/TR/CSS2/sample.html |
|
![]() |
![]() |
![]() |
#12 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75
Karma: 77598
Join Date: Apr 2010
Device: Sony PRS-650, Hanvon h516, Kobo Aura HD
|
I really meant that it's choice of defaults was poor
![]() |
![]() |
![]() |
![]() |
#13 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Also, margins in cm? That is a road to disaster. If you want to use openoffice, there are some plugins who can create reasonable ePUB's I believe.
|
![]() |
![]() |
![]() |
#14 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75
Karma: 77598
Join Date: Apr 2010
Device: Sony PRS-650, Hanvon h516, Kobo Aura HD
|
This stuff was all in when I got the original HTML. I don't necessarily want any of it, and OpenOffice wasn't my choice. I just want to read the book
![]() And I understand it's not Sigil's fault too - I just used this excellent tool to make the epub from the html. |
![]() |
![]() |
![]() |
#15 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Change everything in the internal stylesheet from cm to something else, e.g. pt. Margins of 5pt would be acceptable usually.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can't seem to change epub margins | Desertway | Calibre | 7 | 01-19-2012 04:28 AM |
Problems with epub and the margins | un pez de papel | ePub | 1 | 11-28-2010 07:16 PM |
Epub to mobi margins.. | Corran006 | Calibre | 0 | 08-27-2010 08:39 PM |
Testing margins in ePUB. | Jellby | Workshop | 8 | 01-03-2010 11:57 AM |
Classic epub Margins on nook | Trubu | Barnes & Noble NOOK | 6 | 12-14-2009 11:03 PM |