|
|
#151 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 301
Karma: 161452
Join Date: May 2009
Location: The Right Coast
Device: PC & Smartphone
|
I believe just the following should do what you want: body { background:#F9F0C9 url('file:///C:/Program Files (x86)/Calibre2/resources/images/old_paper.jpg'); } If the book you load includes it's own background color (the #F.. portion) and image (the url portion) it might override the info above. Adding " !important" (including space but without quotes) after the closing parenthesis and before the semi-colon might correct this issue. (I've never used an image. It will definitely override the color.) CSS, kind of like missing ebook metadata, doesn't complain if various bits and pieces are not present. CSS just assumes that the defaults apply and only the mentioned bits are being changed. The body section affects the page itself; the p is for defining paragraphs, the h1-p6 are various heading definitions. The selection... is beyond my knowledge.
Last edited by Sabardeyn; 12-30-2012 at 06:15 AM. |
|
|
|
|
|
#152 | |
|
Staff to 4 Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,953
Karma: 2574555
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2,Black Astak PEz, K4NT(now Wifes)
|
Quote:
That path is to the Calibre install folder (which varies by OS) (as do the direction of the \'s )It would be better to place a COPY of that file into the resources\images of the configuration folder BTW 'old_paper.jpg' does not exist in my (default, calibre) install
__________________
Using: Ubuntu(32 bit):Oneric,Precise and XPpro SP3, W7HP(64)- - Libre Office w/Writer2EPUB
Last edited by theducks; 12-30-2012 at 11:06 AM. Reason: configuration folder |
|
|
|
|
|
Enthusiast
|
|
|
|
#153 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 301
Karma: 161452
Join Date: May 2009
Location: The Right Coast
Device: PC & Smartphone
|
Thanks for the clarification, I'm sure it will be of help to users of other OSes.
The info posted was from Cyberxaos' post originally. I just excised the applicable example and did the "CSS to English" translation. The original post has a link that includes the image, I think. Never used pastebin so I'm not sure how they've implemented things - it appears to be a hex dump of an image file. |
|
|
|
|
|
#154 | |
|
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Dec 2012
Device: Sony
|
Quote:
even so thanks for your answer. EDIT: I would be better to apply 'user stylesheet' to a div cantaining all the page instead of body. The scenario for displaying text would be the same, but we can apply a margin before displaying this div in the body. But perhaps, it's not possible... Last edited by maisondouf; 01-05-2013 at 11:20 AM. |
|
|
|
|
|
|
#155 |
|
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Dec 2012
Device: Sony
|
Youpi, I found a better solution...
Uninstall Ubuntu version (0.8.38) ande install last stable (0.9.13). Now margin options are available. |
|
|
|
|
|
#156 | ||
|
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,416
Karma: 11289119
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7, Sony PRS-950, Sony PRS-505, PRS-300
|
Quote:
From What's New: Quote:
__________________
-- Good Reading, Walt -- 20GB of free CLOUD STORAGE: Use this link to sign up for a free 15GB Copy.com cloud storage account and we both get an extra 5GB of free space. |
||
|
|
|
|
|
#157 |
|
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Jan 2013
Device: Kindle Keyboard
|
Background color ignored?
Hi,
I created a user CSS template from some of the examples here but it seems that the background color is ignored by the Calibre eBook viewer. I can change the color in the eBook viewer preferences window but not through the CSS style-sheet. Is this a bug or is there something wrong with my code? Calibre version 0.9.14 on Windows 8 64-bit. Code:
h1, h2, h3, h4, h5, h6 {
font-weight: bolder;
text-transform: capitalize;
color: rgb(0, 0, 0);
text-align:center;
}
body {
color: rgb(0, 0, 0);
background-color: rgb(254, 243, 213);
text-align: justify;
line-spacing: 1.8;
margin-top: 0px;
margin-bottom: 4px;
margin-right: 50px;
margin-left: 50px;
text-indent: 3em;
}
|
|
|
|
|
|
#158 |
|
Creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,657
Karma: 3473290
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You need to use !important to ensure you override whatever color is set in the books code.
__________________
Get calibre Notice to all: I can not provide assistance with DRM removal, for legal reasons, so please do not contact me about it. |
|
|
|
|
|
#159 |
|
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Jan 2013
Device: samsung GT-P5100
|
Dear all,
I am a new user and don't know much about CSS. I am using Persian language. It is from right to left. How can I tell Calibre through CSS to change the text-direction to "right-to-left"? Thanks in advance. |
|
|
|
|
|
#160 |
|
Member
![]() Posts: 21
Karma: 10
Join Date: Dec 2008
Device: Panasonic Toughbook CF18
|
I'm trying to use this background image how do I stop it from being tiled so it fits the Calibre reader? I'm attempting to create something similar to what I have set up in ubook.
Thanks. Last edited by Vortex; 01-23-2013 at 04:46 PM. |
|
|
|
|
|
#161 | |
|
Staff to 4 Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,953
Karma: 2574555
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2,Black Astak PEz, K4NT(now Wifes)
|
Quote:
Code:
background-repeat: no-repeat;
__________________
Using: Ubuntu(32 bit):Oneric,Precise and XPpro SP3, W7HP(64)- - Libre Office w/Writer2EPUB
|
|
|
|
|
|
|
#162 | |
|
Member
![]() Posts: 21
Karma: 10
Join Date: Dec 2008
Device: Panasonic Toughbook CF18
|
Yeah, with the style sheet. This is what I have:
Quote:
|
|
|
|
|
|
|
#163 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 301
Karma: 161452
Join Date: May 2009
Location: The Right Coast
Device: PC & Smartphone
|
Vortex,
Take a look at Message #147 by Cyberxaos. Based on that message, it appears that these are two separate commands that should be entered on different lines in the CSS. Hope this helps! PS: I find the use of the Book's Spine quite an interesting affect. |
|
|
|
|
|
#164 | |
|
Member
![]() Posts: 21
Karma: 10
Join Date: Dec 2008
Device: Panasonic Toughbook CF18
|
Thanks Sabardeyn, That's it. Now looks like this, (is there any way to turn off the slidey thing on the right?)
![]() Quote:
![]()
Last edited by Vortex; 01-25-2013 at 03:26 PM. |
|
|
|
|
|
|
#165 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 301
Karma: 161452
Join Date: May 2009
Location: The Right Coast
Device: PC & Smartphone
|
Sorry, I'm not aware of a way to turn off the slider on the right. It may be possible, but if it is, the next avalible calibre guru will have to chime in.
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Custom CSS for output | deckoff | Calibre | 1 | 08-28-2010 11:55 PM |
| ePub with custom .css on a 505 | dicknskip | Sony Reader Dev Corner | 3 | 06-09-2010 11:34 PM |
| User stylesheets for ePub files | salty-horse | Sony Reader Dev Corner | 12 | 02-23-2010 07:44 AM |
| ePub conversion: override existing css with a custom one | sbin | Calibre | 1 | 01-09-2010 04:03 AM |
| Calibre's generated css for epub | brewt | Calibre | 7 | 12-29-2008 09:59 AM |