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 05-23-2015, 01:10 PM   #196
RobertJSawyer
Guru
RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.
 
RobertJSawyer's Avatar
 
Posts: 730
Karma: 3871570
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
}
RobertJSawyer is offline   Reply With Quote
Old 05-25-2015, 01:31 PM   #197
RobertJSawyer
Guru
RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.
 
RobertJSawyer's Avatar
 
Posts: 730
Karma: 3871570
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}
RobertJSawyer is offline   Reply With Quote
Advert
Old 09-13-2015, 08:29 AM   #198
GERGE
Guru
GERGE ought to be getting tired of karma fortunes by now.GERGE ought to be getting tired of karma fortunes by now.GERGE ought to be getting tired of karma fortunes by now.GERGE ought to be getting tired of karma fortunes by now.GERGE ought to be getting tired of karma fortunes by now.GERGE ought to be getting tired of karma fortunes by now.GERGE ought to be getting tired of karma fortunes by now.GERGE ought to be getting tired of karma fortunes by now.GERGE ought to be getting tired of karma fortunes by now.GERGE ought to be getting tired of karma fortunes by now.GERGE ought to be getting tired of karma fortunes by now.
 
Posts: 732
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;
}
GERGE is offline   Reply With Quote
Old 10-10-2015, 07:15 PM   #199
truth1ness
Zealot
truth1ness is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!truth1ness is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!truth1ness is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!truth1ness is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!truth1ness is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!truth1ness is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!truth1ness is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!truth1ness is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!truth1ness is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!truth1ness is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!truth1ness is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!
 
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;
}
truth1ness is offline   Reply With Quote
Old 10-10-2015, 07:23 PM   #200
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by truth1ness View Post
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;
}

what is wrong with the simple

or
were you trying to only control an img that is a descendent of a .container class
theducks is offline   Reply With Quote
Advert
Old 10-10-2015, 10:13 PM   #201
truth1ness
Zealot
truth1ness is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!truth1ness is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!truth1ness is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!truth1ness is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!truth1ness is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!truth1ness is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!truth1ness is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!truth1ness is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!truth1ness is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!truth1ness is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!truth1ness is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!
 
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:
width: auto;
kind of just smushes everything vertically but leaves it stretched out horizontally. I tried adding !important to see if it would override but that didn't seem to help.
truth1ness is offline   Reply With Quote
Old 10-12-2015, 11:44 AM   #202
mr.derek
Junior Member
mr.derek began at the beginning.
 
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;
}
But I still get the blue coloured links. I read somewhere in the start of this thread that it wasn't supported, but has this changed, or is there a workaround?

Thanks so much for your help!

Derek.
mr.derek is offline   Reply With Quote
Old 10-12-2015, 12:40 PM   #203
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by mr.derek View Post
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;
}
But I still get the blue coloured links. I read somewhere in the start of this thread that it wasn't supported, but has this changed, or is there a workaround?

Thanks so much for your help!

Derek.
Conversion has a setting to remove all color calls (results are your readers default. Blue would be typical for links)

Did you want it to be some other color ?
a {color: black; } < gets any state of A

usually works
theducks is offline   Reply With Quote
Old 10-12-2015, 05:48 PM   #204
mr.derek
Junior Member
mr.derek began at the beginning.
 
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;
}
Thanks again for your help!
mr.derek is offline   Reply With Quote
Old 11-29-2015, 03:16 PM   #205
Einenlum
Junior Member
Einenlum began at the beginning.
 
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.
Einenlum is offline   Reply With Quote
Old 11-30-2015, 04:26 PM   #206
ostoha
Junior Member
ostoha began at the beginning.
 
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
Attached Thumbnails
Click image for larger version

Name:	2015-12-01.png
Views:	2869
Size:	557.2 KB
ID:	144203  
Attached Images
File Type: bmp book_white.m2.bmp (720.1 KB, 1331 views)

Last edited by ostoha; 11-30-2015 at 04:28 PM.
ostoha is offline   Reply With Quote
Old 04-17-2016, 01:32 PM   #207
epubs
Junior Member
epubs began at the beginning.
 
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?

epubs is offline   Reply With Quote
Old 04-19-2016, 07:10 PM   #208
Love2readheas
RomSusp & GoodReads Lover
Love2readheas began at the beginning.
 
Love2readheas's Avatar
 
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.
Love2readheas is offline   Reply With Quote
Old 04-19-2016, 09:54 PM   #209
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Love2readheas View Post
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.
You could do it that way. But that means touching every book

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>
theducks is offline   Reply With Quote
Old 04-20-2016, 01:00 AM   #210
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by Love2readheas View Post
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.
Open a book in the viewer. Then click on the viewer's preferences icon. Click on the User Stylesheet tab. I placed the following in this area.

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.
Attached Thumbnails
Click image for larger version

Name:	bigback.jpg
Views:	1862
Size:	168.8 KB
ID:	148024  
DoctorOhh is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 12:33 AM.


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