Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 01-05-2026, 11:58 PM   #1
something
Junior Member
something began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2026
Device: none
Exclamation Text alignment help

Hi there,

I'm fairly new to eBook creation and have some of the basics down but I've run into a problem with the latest one I'm working on.

I am trying to have three separate pieces of text in the same line appear right aligned, center aligned, and left aligned. I have class styles for each piece of text with their specific alignment that are used elsewhere in the book and work fine, however Sigil doesn't seem to like having three separate classes in the same line despite using <span> tags to separate them which should work in theory, right? Am I using the <span> tags incorrectly?

I have even tried to simplify the HTML using style tags and simply floating each piece of text where I need, however it doesn't seem to want to centre align the middle piece of text at all.

I hope this makes sense and I have included a screenshot of the simplified version to illustrate. Any help would be amazing!
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2026-01-06 at 4.55.47 PM.png
Views:	68
Size:	145.4 KB
ID:	220111  
something is offline   Reply With Quote
Old 01-06-2026, 12:28 AM   #2
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,781
Karma: 9501034
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
I would use a single line ,3 column table and format each cell as required
Karellen is offline   Reply With Quote
Old 01-06-2026, 05:16 AM   #3
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: 330
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
I don't think float can take the value 'center'. But you can achieve the result you want by putting the line concerned in a <p> with a class defined as 'center' and then within that <p>, using spans to float your words left or right.

For example:

Code:
<p class="center"><span style="float:left">lorem</span>ipsum <span style="float:right">dolor</span></p>
where the CSS stylesheet defines:

Code:
p.center {text-align: center;}
Or use a table, as Karellen suggests.
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2026-01-06 at 21.39.39.png
Views:	41
Size:	404.5 KB
ID:	220118  

Last edited by philja; 01-06-2026 at 04:44 PM.
philja is offline   Reply With Quote
Reply

Tags
css float command, help needed, sigil 2.6.2, text alignment


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Force text alignment HHJT ePub 28 03-31-2018 02:13 PM
Text alignment in Hebrew odedta Kindle Formats 6 09-24-2014 07:53 AM
Text alignment in Sigil wdaly Sigil 34 01-24-2013 03:45 PM
text alignment issue shaina Sigil 41 12-02-2011 11:07 PM
Text alignment James_Wilde iRiver Story 0 10-25-2010 05:22 AM


All times are GMT -4. The time now is 07:52 AM.


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