![]() |
#91 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Oct 2011
Device: android
|
I am new to both Calibre and CSS but managed to follow the directions from this threadhttp://www.mobileread.mobi/forums/sh...ad.php?t=80790.
I tried many times to alter the default text (i.e. CSS body tag) color of an ebook document (specifically and perhaps ironically a "For Dummies" ebook) and tried to apply the CSS stylesheets that users in this thread posted with no success even after converting the book with Calibre's converter to various formats. I stripped out a few things which in the end I haven't missed. I noticed that calibre assigns its own moniker to the various custom CSS classes in the master stylesheet (i.e. ".Calibre17") and each has its own attributes. What a PITA this process was to figure out for a newbie... I removed these attributes and their respective settings from all ".CalibreX" instances: "color: xxxx", "background-color: xxxx", and "display: block". For some reason I removed the last one on a whim. I have no clue what it did. Thanks. |
![]() |
![]() |
![]() |
#92 | |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,879
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
Hopefully someone with expertise will be able to help you out shortly. |
|
![]() |
![]() |
Advert | |
|
![]() |
#93 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,693
Karma: 58985420
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
My (very simple) interpretation is it is a confining container:
Think of a Shipping Carton (case) of Energy bars as the <body>. Inside the case are display packs (24 bars) <p> Inside the Display pack (usually what you see on the candy counter) a wrapped bars <span> The bars are what you consume < the authors words > Each block confine its contents: A normal block stacks the contents wit the adjacent block An Inline block places the block alongside I also believe a block contains properties (prevents adjacent blocks from inheritance) I would leave the "block: display;" in place Oh! Block also permits different controls depending on recognized device family: Display Aural ... |
![]() |
![]() |
![]() |
#94 |
Member
![]() Posts: 12
Karma: 10
Join Date: Aug 2011
Device: none
|
Using image as background on Ubuntu 11.04
Hi,
I'm new to Linux so I haven't a clue of where in the main File System folder programs get stored etc. Does anyone know exactly where I should put my background image to get it to work with the ebook viewer? My system is using Linux Ubuntu 11.04 - Natty I believe. Thanks. |
![]() |
![]() |
![]() |
#95 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,693
Karma: 58985420
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
To find the folder: Preferences: Miscellaneous: press the button ![]() create the images path if needed |
|
![]() |
![]() |
Advert | |
|
![]() |
#96 |
Member
![]() Posts: 12
Karma: 10
Join Date: Aug 2011
Device: none
|
|
![]() |
![]() |
![]() |
#97 | |
Member
![]() ![]() Posts: 24
Karma: 142
Join Date: Sep 2010
Device: K3, KPW
|
2-Columns Viewer CSS Settings Issue
Quote:
I'm looking to simulate an open book with two pages to view on my laptop or desktop wide screen. |
|
![]() |
![]() |
![]() |
#98 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 468
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
|
Why does this result in wide margins at the sides of each page (as expected), but the text flush with the top and bottom of Calibre's viewer? I tried larger numbers for margin-top and -bottom, without success.
Code:
body { margin-right:200px !important; margin-left:200px !important; margin-top:50px !important; margin-bottom:50px !important; } |
![]() |
![]() |
![]() |
#99 |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,879
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
It would appear that the calibre viewer doesn't do top or bottom margins.
|
![]() |
![]() |
![]() |
#100 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 468
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
|
|
![]() |
![]() |
![]() |
#101 | |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,879
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
The viewer is a ePub viewer, all formats are essentially converted to a form of ePub prior to viewing. Since ePub is a reflowable format the pages change with the font and screen size. So it basicly scrolls the internal html like a browser. Side margins are simple but top and bottom margins, while possible, are quite a bit harder when you are dealing with a format that has unpredictable page lengths. |
|
![]() |
![]() |
![]() |
#102 | |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 468
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
|
Quote:
Instead of writing to the screen starting at y coordinate 0 (relative to the containing window), start writing to the screen at y coordinate margin-top (and stop at bottom of window minus margin-bottom). You wouldn't have to make any changes to the flow of the underlying text. Left and right margins are more complicated, as the text does have to be re-flowed as they change. |
|
![]() |
![]() |
![]() |
#103 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,693
Karma: 58985420
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
![]() Doesn't <body> apply to the entire file and not just the viewport (Calibre)? Add onto this the Calibre-viewer connects (flattens) the entire book beginning to end (CR3 does the same) and would naturally discard any top and bottom Body Margins in the process. |
![]() |
![]() |
![]() |
#104 | |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 468
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
|
Quote:
By "viewport" do you mean the window in which Calibre displays the book? Last edited by foosion; 10-29-2011 at 01:05 PM. |
|
![]() |
![]() |
![]() |
#105 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,693
Karma: 58985420
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom CSS for output | deckoff | Calibre | 1 | 08-29-2010 12:55 AM |
ePub with custom .css on a 505 | dicknskip | Sony Reader Dev Corner | 3 | 06-10-2010 12:34 AM |
User stylesheets for ePub files | salty-horse | Sony Reader Dev Corner | 12 | 02-23-2010 08:44 AM |
ePub conversion: override existing css with a custom one | sbin | Calibre | 1 | 01-09-2010 05:03 AM |
Calibre's generated css for epub | brewt | Calibre | 7 | 12-29-2008 10:59 AM |