Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Viewer

Notices

Reply
 
Thread Tools Search this Thread
Old 08-28-2010, 01:39 AM   #46
WebDesignEbooks
Member
WebDesignEbooks began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Aug 2010
Location: Canada
Device: Sony
Save me a lot of work!
WebDesignEbooks is offline   Reply With Quote
Old 09-01-2010, 10:20 PM   #47
marcot
Member
marcot began at the beginning.
 
Posts: 10
Karma: 10
Join Date: May 2010
Device: iPod Touch
If you intend to apply styles to the navbar, don't make the same mistake I did. I tried to apply styles to the class ".calibrenavbar," which results in zilcho. If you are using an "extra-css" stylesheet from the command line ("ebook-convert" command), Calibre applies the styles to the HTML during an intermediate stage of processing, which can be viewed by using the --debug-pipeline option. Using that option would reveal that the navbar class relevant to styling is ".calibre_navbar."

Last edited by marcot; 09-01-2010 at 10:23 PM.
marcot is offline   Reply With Quote
Advert
Old 09-01-2010, 11:41 PM   #48
WebDesignEbooks
Member
WebDesignEbooks began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Aug 2010
Location: Canada
Device: Sony
Quote:
Originally Posted by marcot View Post
If you intend to apply styles to the navbar, don't make the same mistake I did. I tried to apply styles to the class ".calibrenavbar," which results in zilcho. If you are using an "extra-css" stylesheet from the command line ("ebook-convert" command), Calibre applies the styles to the HTML during an intermediate stage of processing, which can be viewed by using the --debug-pipeline option. Using that option would reveal that the navbar class relevant to styling is ".calibre_navbar."
Thanks for the info. I wasn't planning anything too fancy for the navigation.

Ya got me thinking though, if I have a regular external CSS file and a print CSS file in the same template, which one is Calibre going to use?
WebDesignEbooks is offline   Reply With Quote
Old 09-17-2010, 08:16 AM   #49
towhit523
Member
towhit523 began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Feb 2010
Device: nook, kindle, sony 600, ipad, iphone, droid
External Stylesheets

Quote:
Originally Posted by WebDesignEbooks View Post
What happens when the original HTML file uses an external stylesheet?

All I have found so (did read some posts and the tutorial on compiling your ebook) are is references to the built in CSS screen and using internal stylesheet.

This is my first day here, sorry if I asked this in the wrong thread.
Can someone show me an example of how to specify my external stylesheet in the Extra CSS box? Do I provide the file directory path, for example c:\...\...\mystyle.css? Do I need to copy my stylesheet to a particular location? I have searched the forums and the User Guide for an example but I can't find one. I have been unable to get Calibre to apply my stylesheet.

Thanks in advance.
towhit523 is offline   Reply With Quote
Old 09-17-2010, 12:05 PM   #50
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,546
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
copy paste the contents of the stylesheet into the extra css box.
kovidgoyal is online now   Reply With Quote
Advert
Old 10-04-2010, 07:16 PM   #51
akadaedalus
Enthusiast
akadaedalus began at the beginning.
 
Posts: 28
Karma: 10
Join Date: Jun 2008
Device: Sony PRS-500
Quote:
Originally Posted by kovidgoyal View Post
extra css is not used by the recipe system. You have to use the extra_css field in the recipe itself for that.
Is there a good reason for this restriction? It seems if I am setting extra_css in the common properties, I am accepting that it would be applied to everything, and can accept the consequences.

I'm looking at how the colors blue and gray look really, really faint on the prs-500. I'd like to just make everything black, but don't really want to go into each recipe and add redundant extra_css lines.
akadaedalus is offline   Reply With Quote
Old 10-04-2010, 08:23 PM   #52
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,546
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by akadaedalus View Post
Is there a good reason for this restriction? It seems if I am setting extra_css in the common properties, I am accepting that it would be applied to everything, and can accept the consequences.

I'm looking at how the colors blue and gray look really, really faint on the prs-500. I'd like to just make everything black, but don't really want to go into each recipe and add redundant extra_css lines.
No reason, it's just not something I ever felt the need to implement.
kovidgoyal is online now   Reply With Quote
Old 11-13-2010, 09:34 AM   #53
WeibRabe
Junior Member
WeibRabe began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Nov 2010
Location: Saint Petersburg, Russia
Device: B&N Nook + Kindle 3
kovidgoyal,

does colibre understand such a css:
Code:
pre{whte-space:pre-wrap;}
? After converting chm files, my Kindle doesn't show some lines in pre blocks (if they are too long), part of lines are not visible and I'd like to wrap them when they don't fit to screen..

I've tried different variants with white-space as normal (the result is awful), with mentioning width, but nothing helped me.
WeibRabe is offline   Reply With Quote
Old 11-13-2010, 12:59 PM   #54
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,546
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
the kindle doesn't support css. You have to put this in <pre> tgs, though I don't recall if the kindle even supports that.
kovidgoyal is online now   Reply With Quote
Old 12-04-2010, 05:47 AM   #55
ocgforme
Junior Member
ocgforme has a complete set of Star Wars action figures.ocgforme has a complete set of Star Wars action figures.ocgforme has a complete set of Star Wars action figures.ocgforme has a complete set of Star Wars action figures.
 
Posts: 6
Karma: 340
Join Date: Dec 2010
Device: many
I could *definitely*, desperately use some help with this CSS.

I'm a *totally* novice user of calibre, and I have visual processing issues which demand a certain amount of white space between the text and the frame.

HOWEVER, no matter what fiddling I do to the text alignment, the maximum width, or the margins (measured in pixels only?)--- NONE of those changes show up in the default help "book".

Being able to apply a proper CSS to *everything* I open for myself will allow me to read more (less time spent converting a file to exactly the same file type, but with my necessary margins, et alia).

I need about 1/8-1/4" on all sides of the frame as white space. I definitely, absolutely, prefer left-justified formatting,
ocgforme is offline   Reply With Quote
Old 12-05-2010, 05:21 PM   #56
nothing girl
Junior Member
nothing girl began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Dec 2010
Device: ipod touch
Question


Hi guys sorry for the noob question but I was hoping I could get some help changing the background and font color. I let my BF take my ipod (as well as all my ebooks, lol) for a few weeks out of the country and so I need to do all my reading on calibre for now and I hate white backgrounds with black letters. I did use the CSS from the first page of this thread and it worked but the colors aren't much different and my attempt to change it failed. Can someone tell me how, or what to replace to get a slightly off black background with a cyan or pale violet font?

I believe this is what I am trying to get, 090909 (background) and 844fdf (font)
but it doesn't seem to be working for me. I am sure its just a mistake with how I am replacing the text, but I have no clue exactly how it should be typed.
nothing girl is offline   Reply With Quote
Old 12-05-2010, 05:52 PM   #57
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
open any book in calibre's viewer, insert in preferences->user stylesheet
Code:
body {background:#090909;color:#844fdf;}
Perkin is offline   Reply With Quote
Old 02-18-2011, 12:01 PM   #58
darkspruce
Junior Member
darkspruce began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Feb 2011
Device: elonex 511eb
this is a brilliant thread and helpful website.I've tried all the suggestions and they all worked immediately.I really like being able to swap between backgrounds.
I've got a Samsung P2.You can read texts on it(but only a few lines to a page) and with the latest firmware they've come up with some intersting looking backgrounds or"paper-like looks.One is a sort of light brown sort of sepia look which gives the impression of an antique book.It looks good but most of all it's really easy on the eyes.Is there an easy way to do this?
Thanks

Last edited by darkspruce; 02-18-2011 at 12:04 PM.
darkspruce is offline   Reply With Quote
Old 02-20-2011, 01:09 PM   #59
darkspruce
Junior Member
darkspruce began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Feb 2011
Device: elonex 511eb
textures

I've played around with different colours but is there any way you can introduce textures.I've seen an antiquey sort of beige/brown sandy colour which I find is very easy on the eyes and I'd like to try it.
This is a fab website!
darkspruce is offline   Reply With Quote
Old 02-20-2011, 01:19 PM   #60
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,546
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You'd have to use an image as the background. Just google css background image
kovidgoyal is online now   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 11:05 PM.


MobileRead.com is a privately owned, operated and funded community.