![]() |
#196 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 737
Karma: 4306712
Join Date: Jun 2006
Location: Toronto
Device: Kobo Libra 2, Clara 2E, and Clara HD; Kindle PaperWhite
|
I'd like my paragraphs not justified (flush left, ragged right) and I thought this User Stylesheet in the calibre ebook viewer would do that (as well as turn off widow/orphan control), but the paragraphs are still fully justified (flush left, flush right) in the calibre ebook viewer. What CSS should I be using?
Thank you! body { text-align: left; widows: 0; orphans: 0 } |
![]() |
![]() |
![]() |
#197 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 737
Karma: 4306712
Join Date: Jun 2006
Location: Toronto
Device: Kobo Libra 2, Clara 2E, and Clara HD; Kindle PaperWhite
|
Found an answer. This seems to do the trick:
body { widows: 0; orphans: 0; text-align: left !important; } p {text-align: left} |
![]() |
![]() |
![]() |
#198 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 733
Karma: 5797160
Join Date: Jun 2010
Location: Istanbul
Device: Kobo Libra
|
A recommendation, I have noticed that calibre understands text-rendering option of CSS, you should use it, it is pretty awesome.
What it does is enabling ligatures and kerning. Why they are not already enabled, I don't know. You could use it like this: Code:
body { text-rendering: geometricPrecision; widows: 0; orphans: 0; } p { line-height:1.633em; margin-top:0; margin-bottom:0; text-align:justify; } |
![]() |
![]() |
![]() |
#199 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 126
Karma: 50000
Join Date: Mar 2015
Device: none
|
I'm trying to set the maximum height for images in calibre reader. I added the following to the CSS in settings but it didn't do anything. What is the correct way to do this?
.container img { max-height: 30px; } |
![]() |
![]() |
![]() |
#200 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,057
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
what is wrong with the simple or were you trying to only control an img that is a descendent of a .container class |
|
![]() |
![]() |
![]() |
#201 | |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 126
Karma: 50000
Join Date: Mar 2015
Device: none
|
Ah, that worked.
However, for some reason it seems like only max-height works. For example, max-height works but hight, width, and max-width don't seem to work. Using max-height without being able to set Quote:
|
|
![]() |
![]() |
![]() |
#202 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Oct 2015
Device: Windows
|
Link colours?
Hi!
Sorry I'm new, but I couldn't figure this out - is there a way to chang link colours through CSS in Calibre reader? i.e. table of contents links or footnote links I tried: Code:
a:link { color: #ECF0F1; background:#2B2B2B; } Thanks so much for your help! Derek. |
![]() |
![]() |
![]() |
#203 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,057
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Did you want it to be some other color ? a {color: black; } < gets any state of A usually works |
|
![]() |
![]() |
![]() |
#204 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Oct 2015
Device: Windows
|
link colours
Hi!
Thanks for your quick reply! After reading your post, I did some more testing - it turns out that it was the ebook that I was using as a test case - the links would not change from blue with the a{color:black} CSS entry. However, when I loaded other books, the entry worked fine to change the colour! Awesome! =) I couldn't figure out why that specific book wouldn't change (I'm not a CSS expert) so I just used the !important tag to force it, and this worked. Code:
a:link { color: #ECF0F1 !important; background:#2B2B2B !important; } |
![]() |
![]() |
![]() |
#205 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Nov 2015
Device: Kobo touch
|
Calibre doesn't seem to care about top-margin (or top-padding) and bottom-margin (or bottom-padding). Am I doing it wrong?
Actually it works with the general options, but not by doing it thanks to a specific stylesheet. Last edited by Einenlum; 11-29-2015 at 03:19 PM. |
![]() |
![]() |
![]() |
#206 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Nov 2015
Device: PC
|
CSS Tems
CSS
------------------------ body { background:#F9F0C9 url('file:///D:/book_white.m2.bmp') no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } В настройках: -------------------------- Верхнее поле: 25px Нижнее поле: 40px Боковое поле: 75px Last edited by ostoha; 11-30-2015 at 04:28 PM. |
![]() |
![]() |
![]() |
#207 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Apr 2016
Device: android tablet
|
Styling for full screen view only?
The full screen options are limited and I would like to style the body margins to apply to full screen view only. I can do this while in full screen, but I would like to use User Stylesheet so the changes are applied every time. Is there a parent selector or someway to apply styles to full screen view? ![]() ![]() ![]() ![]() |
![]() |
![]() |
![]() |
#208 |
RomSusp & GoodReads Lover
![]() Posts: 9
Karma: 10
Join Date: Feb 2016
Location: Charleston, SC
Device: Windows 7, Asus Transformer Tablet, Acer Tablet
|
Hi, I'm obviously new to Calibre and I need some assistance please.
I'd like to install a background image (in place of a color) to appear throughout the pages of my books. Would this take place in "Edit Book"? I'm just guessing here because I honestly have no clue. Please give me very basic, simple instructions so I don't get confused and have to bug you again (probably will anyway, sorry). Thanks very much for any help you can supply. |
![]() |
![]() |
![]() |
#209 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,057
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
or, if you only want it on YOUR viewer, add a User Stylesheet to the VIEWERS preferences (nottthe one in the main Calibre) you want to set up what you want Code:
<body>background-image: .... </body> |
|
![]() |
![]() |
![]() |
#210 | |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,896
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
body { background-image:url("file:///c:/bigback.jpg"); background-size:100% 100%; background-repeat:no-repeat; background-attachment:fixed; background-position:center } Then click OK. Your file and path would have to be substituted for where I have c:/bigback.jpg. I also attached the image I use in case you are interested. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |