![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,624
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Adjusting "space" paragraph width
Hi
I format ebooks using styles. I use a main textbody paragraph style. Nothing unusual. ![]() Sometimes, it's required to mark a breathing space between text paragraphs. The non-recommended (dirty?) way to do it is to add an empty paragraph. Easy, you just click "Enter" in a text-processor and get a <p> </p> in your html (or many if you click several times). You also can try to do it in a "cleaner" way - either using a slightly modified textbody style, incorporating a bigger margin-bottom value of some pixels. You need to make use of two styles (or of two different classes). - or by creating a dedicated "space" paragraph. To avoid it to be empty, you can insert a nobreak space. You give it a class name (say "BlancUn"), provide this css class with some margin and padding values. Either way, when you display it, you may realize using the Inspector of the Calibre editor, that you do not get the exact vertical margin width you were aiming for because a 1em -webkit-margin-before and a 1em -webkit-margin-after seems to be systematically added by the so called "user agent stylesheet" (see screenshot). This spoils the space display if you wish to use only a small value. I'd like to know if this user agent values are only a Calibre editor peculiarity or if it will be met elsewhere with common ebook-readers. Maybe the optimal way to deal with this would be to add some null webkit margin values in the css? Last edited by roger64; 01-04-2018 at 08:45 PM. Reason: optimal and -webkit |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,347
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Those rules come from WebKit, not the editor. So any rendering engine that happens to use WebKit will have them. And note that you have to take into account margin collapsing as well https://css-tricks.com/what-you-shou...psing-margins/
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,624
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Thank you for your reply and for a very informative link
![]() |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
InDesign to ePub: Preflight question about "char width" | mtrahan | ePub | 4 | 03-28-2013 02:42 PM |
Are paragraph ending marks ("pilcrow" symbols) necessary for page breaks? | DSpider | Workshop | 4 | 01-02-2012 03:57 PM |
Feature Request: configurable space setting for "Insert blank line" in "Look & Feel" | therealjoeblow | Calibre | 15 | 07-25-2011 03:14 PM |
Paragraph/line space - "n" added | NormalJoe | Conversion | 6 | 01-25-2011 11:28 AM |
Centering and adjusting the width of a block | Jellby | ePub | 3 | 04-09-2009 12:38 PM |