Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 05-16-2022, 02:51 PM   #346
borricua
Junior Member
borricua began at the beginning.
 
Posts: 1
Karma: 10
Join Date: May 2022
Device: Windows desktop
Quote:
Originally Posted by Ralob View Post
My personal CSS style is extremely basic, but it does exactly what I want- proper indentation for all paragraphs, adequate spacing between lines, background color that is easy on the eyes, and centered headings. Very basic but it does its job.

body {color:rgb(0,0,0);
background-color:rgb(174,174,174);
text-align:justify;
line-spacing:1.8;
margin-top:0px;
margin-bottom:4px;
margin-right:50px;
margin-left:50px;
text-indent:3em;}
h1, h2, h3, h4, h5, h6
{color:black;
text-align:center;
font-style:italic;
font-weight:bold;}
I entered you css and added a font family but it's still displaying in a serif font.
body { font-family: Verdana, Geneva, Tahoma, sans-serif;
color:rgb(0,0,0);
background-color:rgb(174,174,174);
text-align:justify;
line-spacing:1.8;
margin-top:0px;
margin-bottom:4px;
margin-right:50px;
margin-left:50px;
text-indent:3em;}
h1, h2, h3, h4, h5, h6
{color:black;
text-align:center;
font-style:italic;
font-weight:bold;}
borricua is offline   Reply With Quote
Old 05-17-2022, 01:35 PM   #347
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,778
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Your issue may be the first C (in CSS)
you set the BODY.
that does not overrule a P (or any other) font-family if declared further into the BOX Model. That simply says to use this if nothing ELSE takes over.
theducks is online now   Reply With Quote
Advert
Old 07-06-2022, 12:09 AM   #348
mark_e_h
Connoisseur
mark_e_h began at the beginning.
 
Posts: 93
Karma: 20
Join Date: Aug 2011
Device: Kindle Paperwhite/IpadMini
Quote:
Originally Posted by Ralob View Post
My personal CSS style is extremely basic, but it does exactly what I want- proper indentation for all paragraphs, adequate spacing between lines, background color that is easy on the eyes, and centered headings. Very basic but it does its job.

body {color:rgb(0,0,0);
background-color:rgb(174,174,174);
text-align:justify;
line-spacing:1.8;
margin-top:0px;
margin-bottom:4px;
margin-right:50px;
margin-left:50px;
text-indent:3em;}
h1, h2, h3, h4, h5, h6
{color:black;
text-align:center;
font-style:italic;
font-weight:bold;}
I tried using this basic style, but it seems to be ignored.
I'm sure my ignorance. In particular I would like to increase space between lines of text.

I would appreciate it if someone could point me in a direction on how to implement the style and make the reader pay attention.
thx,

.
mark_e_h is offline   Reply With Quote
Old 07-06-2022, 05:34 AM   #349
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,778
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
I think there is an error in that style
that should be:
line-height: 1.8 not line-spacing
theducks is online now   Reply With Quote
Old 07-06-2022, 01:11 PM   #350
mark_e_h
Connoisseur
mark_e_h began at the beginning.
 
Posts: 93
Karma: 20
Join Date: Aug 2011
Device: Kindle Paperwhite/IpadMini
Quote:
Originally Posted by theducks View Post
I think there is an error in that style
that should be:
line-height: 1.8 not line-spacing
That seems to be it.

Do you know if I put CSS styles in for a book, does Calibre only use it on the single book? Or is it applied to all books I read?

Thanks for your help.

BTW,
https://www.w3schools.com/css/default.asp
Was useful for me.


.
mark_e_h is offline   Reply With Quote
Advert
Old 07-06-2022, 01:51 PM   #351
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,778
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 mark_e_h View Post
That seems to be it.

Do you know if I put CSS styles in for a book, does Calibre only use it on the single book? Or is it applied to all books I read?

Thanks for your help.

BTW,
https://www.w3schools.com/css/default.asp
Was useful for me.

.
Don't know. Knowing how Kovid does things thoroughly, Settings (in the Viewer) applies to the Viewer.

I hand edit my CSS in all books (cue Frank Sinatra: My Way) and use Publisher styles (some are now mine) on my devices.
theducks is online now   Reply With Quote
Old 07-15-2022, 02:51 AM   #352
nqk
Fanatic
nqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beauty
 
Posts: 516
Karma: 32106
Join Date: Feb 2012
Device: Onyx Boox Leaf
Quote:
Originally Posted by mark_e_h View Post
That seems to be it.

Do you know if I put CSS styles in for a book, does Calibre only use it on the single book? Or is it applied to all books I read?

Thanks for your help.

BTW,
https://www.w3schools.com/css/default.asp
Was useful for me.


.
It applies to all books. But it may require !important to overwrite the built-in CSS of the book.
nqk is offline   Reply With Quote
Old 07-15-2022, 03:15 PM   #353
mark_e_h
Connoisseur
mark_e_h began at the beginning.
 
Posts: 93
Karma: 20
Join Date: Aug 2011
Device: Kindle Paperwhite/IpadMini
Quote:
Originally Posted by theducks View Post
I think there is an error in that style
that should be:
line-height: 1.8 not line-spacing
OK - on some books,
line-height: 5.0 !important;
does exactly what I expect it to. On others, it seems to be ignored.

Any one help with the difference. How do I get the epub reader to pay attention?
thx,


.
mark_e_h is offline   Reply With Quote
Old 07-15-2022, 03:32 PM   #354
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,778
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 mark_e_h View Post
OK - on some books,
line-height: 5.0 !important;
does exactly what I expect it to. On others, it seems to be ignored.

Any one help with the difference. How do I get the epub reader to pay attention?
thx,


.
Depends
Some devices do their own thing. Period

Yor problem (some books) is the Order. You set it in one place. A nested blocks style overrides it.

Nesting of styles (usage) can be important.
theducks is online now   Reply With Quote
Old 07-19-2022, 01:02 PM   #355
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,887
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
A line height of 5.0? That IMHO is too large.
JSWolf is offline   Reply With Quote
Old 07-19-2022, 02:27 PM   #356
mark_e_h
Connoisseur
mark_e_h began at the beginning.
 
Posts: 93
Karma: 20
Join Date: Aug 2011
Device: Kindle Paperwhite/IpadMini
Quote:
Originally Posted by JSWolf View Post
A line height of 5.0? That IMHO is too large.
I think I was just trying different numbers to see if anything made a difference.
All numbers were treated the same way - they were ignored.
Other format items (margins, for instance) actually made a difference.

.
mark_e_h is offline   Reply With Quote
Old 07-19-2022, 03:29 PM   #357
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,887
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by mark_e_h View Post
I think I was just trying different numbers to see if anything made a difference.
All numbers were treated the same way - they were ignored.
Other format items (margins, for instance) actually made a difference.

.
You might want to set all of your CSS at !important. It should be able to override the book's CSS

Code:
body {
  line-height: 5.0; !important
}
JSWolf is offline   Reply With Quote
Old 08-19-2022, 10:40 AM   #358
rockster
Enthusiast
rockster began at the beginning.
 
Posts: 47
Karma: 10
Join Date: Sep 2012
Device: kindle
I tried these css styles and the line height style worked, but margin styles did not worked.

Code:
body {
  line-height: 1.3; !important
  margin-right:100px; !important
  margin-left:100px; !important
}
rockster is offline   Reply With Quote
Old 08-19-2022, 11:37 AM   #359
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,887
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by rockster View Post
I tried these css styles and the line height style worked, but margin styles did not worked.

Code:
body {
  line-height: 1.3; !important
  margin-right:100px; !important
  margin-left:100px; !important
}
You can use the viewer settings to change the L/R margins.
JSWolf is offline   Reply With Quote
Old 08-19-2022, 12:44 PM   #360
rockster
Enthusiast
rockster began at the beginning.
 
Posts: 47
Karma: 10
Join Date: Sep 2012
Device: kindle
I forget about that. Thanks.
rockster is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 10:16 PM.


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