07-23-2012, 10:38 PM | #1 |
Wizard
Posts: 2,145
Karma: 11174187
Join Date: Jan 2011
Device: Sony 350, K3-3G, K4SO, KPW
|
Need help with css again
I'm reading a book with a very wide left margin. I exploded it, and edited the css file to remove all the left margin notes and the indents, but there's still a very wide margin on the left. Can somebody look at the css for me and tell me what the problem is?
Thanks! (I'm still very new to this game) Spoiler:
|
07-23-2012, 11:05 PM | #2 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
The css you supplied looked clean. |
|
Advert | |
|
07-23-2012, 11:09 PM | #3 | |
Well trained by Cats
Posts: 29,801
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:
to know what affects a paragraph, we need to know the class of th paragraph, the class of a surrounding div (if any) EPUB is like Ogres (which is like Onions: Layers ) What you may have is: 1: a invalid/incorrect Link statement so it is not using this stylesheet 2: there is a xpgt sheet that is overriding (use the QC plugin to remove) 3: there is an error in the stylsheet tat ADE tris on and ignores all or part. Validate at http://jigsaw.w3.org/css-validator/#validate_by_upload |
|
07-24-2012, 05:22 AM | #4 |
Guru
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
2b. style assignments in the < head > section of the html files which are overriding any others.
|
07-24-2012, 09:24 AM | #5 | |
Well trained by Cats
Posts: 29,801
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:
I have been bit by a double or spllt definition of a selector and wondered why the Inspector (a right click option in the Viewer) showed different than it said in the First (an what I thought, was the only) definition. I now use a program called Free CSS Toolbox to sort my (long) CSS |
|
Advert | |
|
07-24-2012, 10:32 AM | #6 |
Wizard
Posts: 2,145
Karma: 11174187
Join Date: Jan 2011
Device: Sony 350, K3-3G, K4SO, KPW
|
I ran Modify ePub plugin, with "Remove @page and body margin styles" selected, but that didn't seem to do any good either.
I've installed the Quality Check plugin, but can't find it on any of the menus to run it. How do I run the Quality Check plugin on the file? |
07-24-2012, 10:56 AM | #7 | |
Well trained by Cats
Posts: 29,801
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:
Now you will need to customize the Menus in preferences, where you will see it on the right, and you need to make it appear on the left of your chosen menu(s) |
|
07-24-2012, 11:17 AM | #8 |
Wizard
Posts: 2,145
Karma: 11174187
Join Date: Jan 2011
Device: Sony 350, K3-3G, K4SO, KPW
|
Where in Preferences do i go to change the menus? I've been looking at the Preferences screen, even went into the Plugin screen, and don't see any way to get at the menus.
I looked at configure the plugin, and didn't see any way to do it there either. (I installed a bunch of plugins when I didn't know what I was doing - and unfortunately, missed a bunch of stuff. Now I'm paying for it!) |
07-24-2012, 11:21 AM | #9 |
Wizard
Posts: 2,145
Karma: 11174187
Join Date: Jan 2011
Device: Sony 350, K3-3G, K4SO, KPW
|
is right - it's under "toolbar" and I was looking for "menu"
it is now fixed, and I can run quality check on the book. |
07-24-2012, 11:31 AM | #10 |
Wizard
Posts: 2,145
Karma: 11174187
Join Date: Jan 2011
Device: Sony 350, K3-3G, K4SO, KPW
|
ok, and I'm not terribly bright today. I found how to quality check only a selected book. I've got the book only in epub, and checked the epub styles, and it apparently came out clean.
I went in to the html files themselves looking for problems - it turns out every paragraph is in blockquote tags. It's too much work to go into every single html file and delete the blockquote tags by hand - I guess I'll just have to put up with a wide left margin as I read. thanks for all the help and suggestions! |
07-24-2012, 11:59 AM | #11 |
Resident Curmudgeon
Posts: 73,976
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Without seeing the XML code, the problem is probably here...
Code:
.calibre21 { display: block; margin-bottom: 0; margin-left: 1em; margin-right: 0; margin-top: 0 } |
07-24-2012, 12:21 PM | #12 |
Wizard
Posts: 2,145
Karma: 11174187
Join Date: Jan 2011
Device: Sony 350, K3-3G, K4SO, KPW
|
I didn't think 1em would be that significant, but it makes a major difference in the display - thanks!
there's still more of a left margin than I need, but it's much more readable now. |
07-24-2012, 12:43 PM | #13 |
Guru
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
It could be being used (nested) multiple times, body, div, p, could all be using it and also could be nested divs, so each 1em being added together could soon mount up to a large margin, especially if your using larger fonts.
|
07-24-2012, 12:46 PM | #14 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
I think from what Becca said above all the paragraphs are enclosed in blockquote tags. Does the Kindle "hard code" a margin for a blockquote if it is not specified on the style?
You could just open the ePub in Sigil and "blow away" all those <blockquote> tags - so the <p> tags are using only whatever class style is associated with them (which following the advice from JSWolf should now be zero for left margin). |
07-24-2012, 01:01 PM | #15 |
Wizard
Posts: 2,145
Karma: 11174187
Join Date: Jan 2011
Device: Sony 350, K3-3G, K4SO, KPW
|
Did the calibre21 style:
Spoiler:
define the blockquote? looking at the html, I see a lot of this: Spoiler:
but just changing the "margin-left: 1em;" in calibre21 fixed everything - I didn't have to change it in all the other class=calibrexx calls. I wonder if everything is defined in terms of calibre21 somewhere in the css? whatever, it's fixed now, and much more readable. each time this happens to me, I learn more and more about what to look for in my .css files. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Override ePub CSS with userStyle.css? | barium | Sony Reader Dev Corner | 11 | 07-16-2011 03:25 PM |
CSS Help Please | Japes | Sony Reader | 26 | 06-23-2011 10:40 AM |
epub CSS versus "Regular" CSS | konrad | ePub | 4 | 02-18-2011 09:29 AM |
css pseudo elements and adjacent combinators in extra css? | ldolse | Calibre | 2 | 12-21-2010 05:09 PM |
help with css | bobcdy | ePub | 2 | 02-13-2010 11:59 AM |