Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 04-22-2026, 07:55 AM   #1
Vren
Junior Member
Vren began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2026
Device: none
Single word with different font jumps to the next line

Hi,

for names in my acknowledgement I wanted to use the font I use for my title chapters.

But when I do this, the name jumps to the next line in preview and I can't detect the error or the reason why. The name in the font appears in one single line. I haven't found a solution online (or maybe I haven't typed the error correctly).

Can anybody have a look at this and tell me what I can improve/change?

I used this in my style sheet:

/* <p class="LoftygoalsregularNamen">TEXT</p> / Text mit Schriftart "Lofty Goals"*/
.LoftygoalsregularNamen {
font-family: "Loftygoalsregular";
font-weight: bold;
font-style: normal;
text-align: justify;
display: block;
text-indent: 0em;
}

I also have added a test epub file for more info.

Thank you!
Attached Thumbnails
Click image for larger version

Name:	Screenshot font in text.jpg
Views:	47
Size:	288.8 KB
ID:	222764  
Attached Files
File Type: epub Manuscript_fontquestion_copy.epub (222.8 KB, 15 views)
Vren is offline   Reply With Quote
Old 04-22-2026, 08:40 AM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 29,526
Karma: 212177546
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
A p tag is a block-level element. There will always be a line-break at a new p tag. That's why you shouldn't nest p tags. Put the entire paragraph in one p tag and use a div or span tag to apply your css to the pieces you want.

Last edited by DiapDealer; 04-22-2026 at 08:45 AM.
DiapDealer is online now   Reply With Quote
Old 04-22-2026, 02:18 PM   #3
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 29,526
Karma: 212177546
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Whether you nest p tags or change those to divs or spans, you need to change the value of the display attribute in your .LoftygoalsregularNamen css class from "block" to "inline". That's actually the root of your problem. Spans are inline by default, p and div are block, but can be modified with the display: block|inline attribute|value
DiapDealer is online now   Reply With Quote
Old 04-22-2026, 02:33 PM   #4
philja
Addict
philja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enough
 
Posts: 372
Karma: 518
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
Quote:
Originally Posted by Vren View Post
Hi,

for names in my acknowledgement I wanted to use the font I use for my title chapters.

But when I do this, the name jumps to the next line in preview and I can't detect the error or the reason why. The name in the font appears in one single line. I haven't found a solution online (or maybe I haven't typed the error correctly).

Can anybody have a look at this and tell me what I can improve/change?

I used this in my style sheet:

/* <p class="LoftygoalsregularNamen">TEXT</p> / Text mit Schriftart "Lofty Goals"*/
.LoftygoalsregularNamen {
font-family: "Loftygoalsregular";
font-weight: bold;
font-style: normal;
text-align: justify;
display: block;
text-indent: 0em;
}

I also have added a test epub file for more info.
Place your names in <span> tags as DiapDealer said and change your CSS to remove display: block; --and most of the rest isn't needed either.

It will work the way you want like this:

.LoftygoalsregularNamen {
font-family: "Loftygoalsregular";
font-weight: bold;
}

and in the code view:

<span class="LoftygoalsregularNamen">First Name</span>
philja is offline   Reply With Quote
Old 04-22-2026, 03:30 PM   #5
Vren
Junior Member
Vren began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2026
Device: none
@DiapDealer, thank you so much for the explanation, I've read this before (regarding not nesting p tags) but I forgot. Also thanks with explaining the attributes. I need to write that down an learn more about the basics! I've tested it with changing the attributes and it works, but as this is not the correct way, I've changed it to a span tag as @philja also suggested. I've also cleared it as you, philja, said/showed.

Everything is diplayed perfectly now in my manuscript.
Thanks so much for your help! <3
Vren is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying a Single Word in the Kindle iPad application svenlind Amazon Kindle 6 06-04-2012 01:20 PM
Trying to limit a search to a single line... ElMiko Sigil 10 04-12-2012 03:39 PM
Single line scrolling... Is it possible? maniac1181 Amazon Kindle 5 08-11-2011 12:19 AM
PRS-600 Single Vertical Line issue luluching Sony Reader 0 08-02-2010 09:36 PM
single word wrapped onto a separate line on kindle (pdf to mobi) shinew Calibre 2 03-21-2009 06:16 PM


All times are GMT -4. The time now is 03:11 PM.


MobileRead.com is a privately owned, operated and funded community.