09-24-2023, 08:25 AM | #1 |
Member
Posts: 16
Karma: 10
Join Date: Apr 2023
Location: Scotland
Device: Kindle
|
Why are my tab spaces not uniform?
Hi, I have a question about the tab spaces at the beginning of paragraphs.
In the Word doc, I set the paragraph tabs to 0.50 cm and in Sigil I'm using three spaces. However, the spaces are not uniform throughout the whole document. Sometimes the space before the first word of the paragraph is larger, although the code is exactly the same. See screenshot for what I mean. Can anyone help? Thanks, Helen |
09-24-2023, 08:30 AM | #2 |
Resident Curmudgeon
Posts: 76,395
Karma: 136466962
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
You don't want tabs as indents. You want to use a text-indent in CSS. Forget the class para1. You do not need it. Use just <p> for the standard indented paragraphs. Here is some CSS that will do the job and do it well. Also get rid of the spans with span3 and get rid of the tabs.
CSS Code:
p { margin-top: 0; margin-bottom: 0; text-indent: 0; } Last edited by JSWolf; 09-24-2023 at 02:58 PM. |
09-24-2023, 08:45 AM | #3 |
frumious Bandersnatch
Posts: 7,536
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
To answer the question in the title: Because with justified lines the spaces can stretch or shrink to adjust the line length, like any other space between words.
The solution is: either don't justify or (recommended) use text-indent, which is what you actually want. |
09-24-2023, 12:45 PM | #4 |
Member
Posts: 16
Karma: 10
Join Date: Apr 2023
Location: Scotland
Device: Kindle
|
|
09-24-2023, 12:48 PM | #5 | |
Member
Posts: 16
Karma: 10
Join Date: Apr 2023
Location: Scotland
Device: Kindle
|
Quote:
|
|
09-24-2023, 12:56 PM | #6 |
Member
Posts: 16
Karma: 10
Join Date: Apr 2023
Location: Scotland
Device: Kindle
|
JSWolf, please ignore my last comment. I've worked it out - I've used <p class="firstpara">
Thanks! |
09-24-2023, 02:58 PM | #7 |
Resident Curmudgeon
Posts: 76,395
Karma: 136466962
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
09-25-2023, 06:58 AM | #8 |
the rook, bossing Never.
Posts: 12,344
Karma: 92073397
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
If you use a paragraph style in Word or LO Writer you set the indents, margins, padding, font, size and the docx to epub exactly puts that in the CSS.
Never ever in a wordprocessor use: Tabs More than one consecutive space A space at the start or end of a paragraph Blank lines Those are all for typewriters. Only use paragraph styles. |
10-05-2023, 10:20 AM | #9 |
Onyx-maniac
Posts: 3,158
Karma: 12537601
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5, Go6
|
What Quoth said.
Also, this span3 stuff is overblown. You might just have CSS style for <p> or else use multiple classes: Code:
<p class="firstpara span3">I'm a normal line.</p> |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Regex expression to replace certain spaces with nonbreaking spaces | Dashcroft | Sigil | 3 | 12-10-2022 09:01 PM |
Uniform background-not | tomdy2k | Kobo Reader | 2 | 07-05-2019 09:46 PM |
PW4 screen quality not uniform? | kript96 | Amazon Kindle | 4 | 12-12-2018 09:05 AM |