Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 10-30-2016, 07:41 PM   #1
eggheadbooks1
Read, don't parrot.
eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.
 
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;
  }
HTML:
Code:
<div class="wrap">
    <p class="centered">THE END</p>
  </div>
Isn't putting centered text in a centered box redundant? What is the rationale behind this?
eggheadbooks1 is offline   Reply With Quote
Old 10-30-2016, 08:07 PM   #2
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
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
Turtle91 is offline   Reply With Quote
Advert
Old 10-31-2016, 12:45 AM   #3
eggheadbooks1
Read, don't parrot.
eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.
 
Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
Quote:
Originally Posted by Turtle91 View Post
In that particular example of yours, they are completely redundant unless there was other css that modified them. Cheers
I thought so. Many moons ago I did once come across the problem of needing left-aligned text centered on the screen and what I did then was create a frame (this was before inline-block) that was 50% of the screen and then the text was left-aligned within the frame. But centering text in a centered inline-block struck me as odd. There was nothing else in the CSS that modified the code, not even a size specified for the block.

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.
eggheadbooks1 is offline   Reply With Quote
Old 10-31-2016, 03:07 AM   #4
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
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.
Toxaris is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 04:47 AM.


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