![]() |
#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 |
![]() |
![]() |
![]() |
#2 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,663
Karma: 134319570
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 01:58 PM. |
![]() |
![]() |
![]() |
#3 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,527
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. |
![]() |
![]() |
![]() |
#4 |
Member
![]() Posts: 16
Karma: 10
Join Date: Apr 2023
Location: Scotland
Device: Kindle
|
|
![]() |
![]() |
![]() |
#5 | |
Member
![]() Posts: 16
Karma: 10
Join Date: Apr 2023
Location: Scotland
Device: Kindle
|
Quote:
|
|
![]() |
![]() |
![]() |
#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! |
![]() |
![]() |
![]() |
#7 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,663
Karma: 134319570
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
![]() |
![]() |
![]() |
#8 |
the rook, bossing Never.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,235
Karma: 89531599
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. |
![]() |
![]() |
![]() |
#9 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,851
Karma: 12000011
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5
|
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> |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Regex expression to replace certain spaces with nonbreaking spaces | Dashcroft | Sigil | 3 | 12-10-2022 08:01 PM |
Uniform background-not | tomdy2k | Kobo Reader | 2 | 07-05-2019 08:46 PM |
PW4 screen quality not uniform? | kript96 | Amazon Kindle | 4 | 12-12-2018 08:05 AM |