![]() |
#1 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Jun 2023
Device: PDF on Mac Laptop
|
Extra Space between words (EPUB format)
Hi, I'm creating an ebook and I have been editing it in the EPUB format, but for some reason, I'm getting extra spaces between words. The extra space is not around every word and some words it has a LOT of space, like 5 words take up a whole line.
Here is my HTML/CSS: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" lang="en"> <head> <meta charset="UTF-8" /> <title>Introduction to Python and Programming Concepts</title> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <div class="section"> <h1 id="heading-5">What is an IDE and Installing Visual Studio Code</h1> <p class="no-indent">An Integrated Development Environment (IDE) is a software application that provides a comprehensive set of tools for software development. Visual Studio Code (VS Code) is one such IDE that is free, open-source, and supports a variety of programming languages, including Python. You can download VS Code from the official website (<a href="https://code.visualstudio.com">https://code.visualstudio.com/</a>) and follow the instructions to install it on your system.</p> </div> Also.... this HTML is wrapped in a div with this: .chapter-content { page-break-after: auto; page-break-before: auto; text-align: justify; text-indent: 1.5em } CSS Stylesheet: p.no-indent { text-indent: 0; page-break-before: avoid; break-before: avoid; } .section { break-inside: avoid; } Thank you so much! I've been struggling trying everything. Halin |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,611
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Nothing stands out as the culprit for extra spaces.
Try removing the text-align: justify;, do you still have extra spaces? I don't see how you are using the .chapter-content attribute though, as it's not in your snippet. And is that snippet one of the lines with extra spacing? What reader/app are you viewing it on that shows the extra spaces? Maybe you can post the book? Scramble it if it is in copyright. |
![]() |
![]() |
![]() |
#3 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,062
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
The Justify tells the renderer to pad between words to fill the line.
Some can pad between letter, but that seems to be mostly desktop browsers, not e-readers |
![]() |
![]() |
![]() |
#4 | |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Jun 2023
Device: PDF on Mac Laptop
|
Thank you for responding! I found the main issue, apparently, parenthesis around links adds LOTs of extra space:
(<a href="https://code.visualstudio.com">https://code.visualstudio.com/</a>) I will try taking out text-align: justify; Also here's that stylesheet: .chapter-content { page-break-after: auto; page-break-before: auto; text-align: justify; text-indent: 1.5em } Was using Mac "Books" app and kindle apps. Many thanks!! This helps me a ton! Quote:
Last edited by issybird; 06-22-2023 at 09:40 AM. Reason: Spam edited out. |
|
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Jun 2023
Device: PDF on Mac Laptop
|
text-align: justify was the other reason for spaces!!
Thank you!! |
![]() |
![]() |
![]() |
#6 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,611
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Quote:
Try using html encoding for the brackets. I can't type them in a post as the forum converts them, so find the codes in this list... https://www.freeformatter.com/html-entities.html Yea, that is not surprising. If you have lines with an unusual number of long words, it would be hard to space the line in a pleasing manner. |
|
![]() |
![]() |
![]() |
#7 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,731
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
BR |
|
![]() |
![]() |
![]() |
#8 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,611
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
EPUB to MOBI, kindle shows extra space after quotation mark | akita | Kindle Formats | 29 | 02-05-2016 02:14 AM |
Extra spaces between words | Drybonz | Conversion | 4 | 12-14-2015 08:15 PM |
BUG: Calibre 2.0 E-Book Viewer ePub extra space display problem | trying | Calibre | 3 | 08-28-2014 07:56 AM |
ePub fine in Calibre viewer, but on iPod extra spacing between words | Amalthea | Calibre | 6 | 03-30-2011 11:58 AM |
EPUB to MOBI - Extra Space on Bullet Lists | squiggy | Conversion | 2 | 01-31-2011 10:50 AM |