02-20-2011, 04:53 PM | #61 |
i warned you ...
Posts: 54
Karma: 222
Join Date: Apr 2010
Device: none
|
if you want to have an image as background for the reader, you can try adding something like this
on your user stylesheet CSS (assuming you are on ms-windows) Code:
body { background-image:url("file:///C:/Program Files/Calibre2/resources/images/old_paper.png"); } |
03-05-2011, 02:56 AM | #62 |
Junior Member
Posts: 1
Karma: 10
Join Date: Mar 2011
Device: Droid X
|
I'm sorry but I am very new to Calibre. I have almost the same question as Darkspruce. I found a background of an old style paper that would make it a lot easier on my eyes to read on my laptop. But everything I try in the user stylesheet just keeps the background white. I saved the image to my computer as a .gif file. Can anyone please give me step-by-step info on how to do this, it would be greatly appreciated.
|
Advert | |
|
03-05-2011, 04:43 PM | #63 | |
~~~~~
Posts: 761
Karma: 1278391
Join Date: Aug 2010
Location: USA
Device: Kindle 3, Sony 350
|
Quote:
Can you copy and paste the full CSS you're using? Probably also good to know the format of the book you're trying to read. |
|
03-05-2011, 05:26 PM | #64 |
i warned you ...
Posts: 54
Karma: 222
Join Date: Apr 2010
Device: none
|
.
Could someone please, explain why this thread (it used to be Sticky) is now under Library Management? As to the question: Copy your image somewhere, let’s say on: C:/Program Files/Calibre2/resources/images/old_paper.jpg Assuming your image is called “old_paper.jpg” Open an ebook; on the reader preferences paste the following : body { background-image:url("file:///C:/Program Files/Calibre2/resources/images/old_paper.png"); } Close the preferences dialog. Enjoy |
03-05-2011, 05:50 PM | #65 |
~~~~~
Posts: 761
Karma: 1278391
Join Date: Aug 2010
Location: USA
Device: Kindle 3, Sony 350
|
Polito,
I agree that it would be a good sticky. I'll ask about it. I moved it to Library Management, because that's where we decided to put posts about calibre's ebook viewer. We've tinkered with the description a couple of times to make that more clear, but maybe "viewing" still isn't as obvious as it could be. It needs to be, since reading by itself doesn't intuitively fall under management. |
Advert | |
|
03-05-2011, 06:20 PM | #66 | |
i warned you ...
Posts: 54
Karma: 222
Join Date: Apr 2010
Device: none
|
Quote:
|
|
03-05-2011, 06:50 PM | #67 |
~~~~~
Posts: 761
Karma: 1278391
Join Date: Aug 2010
Location: USA
Device: Kindle 3, Sony 350
|
Well, it's important to keep the list of subforums as short as we can, so we're trying to make the most out of each one. If there started to be a huge increase in the number of threads about the viewer, it might be considered, but at this point, I expect there are other subtopics that would be ahead in the line.
|
03-11-2011, 10:17 AM | #68 |
Junior Member
Posts: 5
Karma: 10
Join Date: Feb 2011
Device: elonex 511eb
|
Please can you help me with this.I've never done programming and I found the css links very confusing.
I've tried to change the page as advised by pollito pito body { background-image:url("file:///C:/Program Files/Calibre2/resources/images/old_paper.png"); } I pasted this: body { background-image:url("file:///C:/Users /white fang / / Downloads\Downloads\old_paper.png"); } changed the file name to old_paper to try to keep it the same as the example but nothing changed in the ebook. Thanks in anticipation. |
03-11-2011, 10:38 AM | #69 |
Junior Member
Posts: 5
Karma: 10
Join Date: Feb 2011
Device: elonex 511eb
|
just figured it .
Polito's message should have jpg at the end not png body { background-image:url("file:///C:/Program Files/Calibre2/resources/images/old_paper.png"); } this is good can have fun now! |
03-11-2011, 03:56 PM | #70 |
~~~~~
Posts: 761
Karma: 1278391
Join Date: Aug 2010
Location: USA
Device: Kindle 3, Sony 350
|
Custom Styles for the calibre eBook Viewer
calibre provides several configuration options to customize the way books appear and behave when read within the calibre ebook viewer. One of the options is to use our own style sheet [CSS], to further customize the appearance, from background and text colors to indents and margins.
This sticky will serve as a repository for examples and tips for creating and using your own style sheets. If you have questions, samples, or other ideas to share, please post them in the discussion thread. Jump to posts: How to use the custom CSS option Misc tips and troubleshooting Sample CSS - Begin Here Last edited by Piper_; 03-11-2011 at 04:14 PM. |
03-11-2011, 03:58 PM | #71 |
~~~~~
Posts: 761
Karma: 1278391
Join Date: Aug 2010
Location: USA
Device: Kindle 3, Sony 350
|
How to use the custom CSS option
|
03-11-2011, 04:06 PM | #72 |
~~~~~
Posts: 761
Karma: 1278391
Join Date: Aug 2010
Location: USA
Device: Kindle 3, Sony 350
|
Misc Tips and Troubleshooting __________________ Remember that using this feature will only affect how ebooks appear in calibre's viewer. It will not change the CSS within your ebook. Keep this in mind if you use the calibre viewer to test the results of tweaks you make to your ebook file. __________________ For a simple tutorial about CSS styles and how to create them, check out the CSS Tutorial __________________ For handy color codes - Hex, RGB, Names: Color Picker: http://www.w3schools.com/tags/ref_colorpicker.asp Basic colors: http://www.w3schools.com/css/css_colors.asp Named colors: http://www.w3schools.com/css/css_colorsfull.asp Run Quick Tests: http://www.w3schools.com/Css/tryit.a...trycss_default __________________ Pseudo selectors, e.g., a:link, p:first-line, etc. are not supported -Kovid __________________ If the book you are reading already defines CSS styles that override your definitions, try adding "!important". For example: body { color: red !important; } -Jellby Last edited by Piper_; 03-11-2011 at 04:42 PM. |
03-11-2011, 04:11 PM | #73 |
~~~~~
Posts: 761
Karma: 1278391
Join Date: Aug 2010
Location: USA
Device: Kindle 3, Sony 350
|
Background and text colors The CSS below results in a beige background with a dark brown font. body { background:#FFF9E3; color:#5E3E0D; } Replace the letters shown in dark red with the color values of your choice. You can also use rgb values or color names, but the choices for names are limited. __________________ Margins Add to the body selector: body { background:#FFF9E3; color:#5E3E0D; margin-right:75px; margin-left:75px; } Again, replace the values with your choice. __________________ Other Common Options body { background:#FFF9E3; color:#5E3E0D; margin-right:75px; margin-left:75px; text-align:justify; line-height:1.25em; background-image:url("file:///C:/Program Files/Calibre2/resources/images/background.jpg") } Note: To use a background image, you must first place one in the folder you're pointing to. |
04-07-2011, 06:46 PM | #74 |
Junior Member
Posts: 2
Karma: 10
Join Date: Apr 2011
Location: Washington
Device: calibre
|
Book Font Color
Question:
If a book already defines the CSS font color, is there a way to override the book’s body definitions? |
05-02-2011, 11:39 AM | #75 |
Enthusiast
Posts: 36
Karma: 10
Join Date: Mar 2011
Device: none
|
How do I find this "Click on the User Stylesheet tab"?
I can't see it in the preference option. |
|
Similar Threads | ||||
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 |