![]() |
#1 |
Read, don't parrot.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
|
Inline-block
I recently saw this in an ebook built by someone in Sigil:
CSS: Code:
p.centered { text-indent: 0em; text-align: center; display:inline-block; } .wrap { text-align: center; } Code:
<div class="wrap"> <p class="centered">THE END</p> </div> |
![]() |
![]() |
![]() |
#2 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,329
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Not necessarily.
It is possible to put a block of left (or right) aligned text centered on the screen. You would center the div with a margin:0 auto; width:50% (or something), and the text within the div could be aligned however. In that particular example of yours, they are completely redundant unless there was other css that modified them. Cheers |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Read, don't parrot.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
|
Quote:
I thought when I saw it that maybe I was missing something, that perhaps it was meant to cover all bases for the myriad of ePub readers out there. But it now just seems like odd coding. Thanks for clarifying. |
|
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
I vaguely remember that these kind of constructions were required for an older version of iBooks to get stuff centered. Must be years ago though.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Inline TOC formatting | phossler | Editor | 9 | 03-29-2014 06:05 AM |
Inline Styles and Overrides | ukzembla | Kindle Formats | 2 | 01-18-2012 07:06 AM |
Creating epub with inline block problem | Gerlyn | ePub | 5 | 12-22-2011 01:59 PM |
Does mobi support display: inline-block; | DeniseL | Kindle Formats | 2 | 09-30-2011 07:33 PM |