![]() |
#1 |
Connoisseur
![]() Posts: 52
Karma: 10
Join Date: Sep 2012
Device: kindle
|
How to increase line spacing in book viewer?
I tried this css code: line-spacing:3.0; but it doesn't seem to work.
|
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,253
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Code:
* { line-height: 3 !important} |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Connoisseur
![]() Posts: 52
Karma: 10
Join Date: Sep 2012
Device: kindle
|
Thanks, it worked.
If i want to add other css codes, do they have to be formated in the same way? For example, the code for justifying the text should it look like this: Code:
* {text-align: justify !important} |
![]() |
![]() |
![]() |
#4 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 81
Karma: 48014
Join Date: May 2011
Location: London, UK
Device: iPad Air 4, iPad mini 5, Kobo Forma, Kobo Aura One, Nook ST Glowlight
|
FWIW, I remove all line-height CSS from my books because my wife and I read at different text sizes.
|
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,178
Karma: 2431850
Join Date: Sep 2008
Device: IPad Mini 2 Retina
|
The "!important" property is quite a little attention-seeker - it says, "look at me, I am more important than anyone else!". In this case, the code:
Code:
* {text-align: justify !important} You should be careful when using "!important"; if you put it into an epub to be read by other people, then they may not thank you for it as you just made it more difficult for them to change the text-alignment to their own preference. Conversely, it may be the only way for you to override the text-alignment in an epub that you want to read. In summary, I would only use "!important" if it does not work without it. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Running with scissors
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,584
Karma: 14328510
Join Date: Nov 2019
Device: none
|
That would break the valid text-align:center and text-align:right and not just fix the ragged right stuff.
|
![]() |
![]() |
![]() |
#7 |
Connoisseur
![]() Posts: 52
Karma: 10
Join Date: Sep 2012
Device: kindle
|
What the Asterisk sing in front mean? I am not very advanced in css coding.
|
![]() |
![]() |
![]() |
#8 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,398
Karma: 168808725
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Last edited by DNSB; 02-01-2021 at 08:30 PM. |
|
![]() |
![]() |
![]() |
#9 |
Running with scissors
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,584
Karma: 14328510
Join Date: Nov 2019
Device: none
|
The asterisk is a big sledge hammer with the !important putting it on steroids because authors and editors and people doing the formatting don't use cascading in their css.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
4.x Viewer Line Spacing? | mwexler | Calibre | 9 | 03-30-2020 06:51 AM |
How to Increase Line Space in Calibre 4.2 Viewer | brown.ml | Calibre | 2 | 10-19-2019 11:07 AM |
docx to mobi conversion: how to increase line spacing | dsv | Conversion | 4 | 06-25-2019 11:02 PM |
Pdf line spacing in Calibre Viewer | sanon | Library Management | 4 | 04-20-2016 07:07 PM |
Can't adjust line spacing in book bought from Kobo | mumbletop | Kobo Reader | 1 | 11-06-2012 08:57 PM |