Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 05:47 PM   #31
Horus01
Junior Member
Horus01 will become famous soon enoughHorus01 will become famous soon enoughHorus01 will become famous soon enoughHorus01 will become famous soon enoughHorus01 will become famous soon enoughHorus01 will become famous soon enough
 
Posts: 3
Karma: 530
Join Date: May 2012
Device: Kindle Voyage
I use this code for poems; it doesn't work in ADE, but it does in Kindle. It functions similarly to the code with `width: fit-content`.

Code:
blockquote.poem {
    display: table;
    margin: 1em auto;
    padding: 0 1em;
  }
Horus01 is offline   Reply With Quote
Old Yesterday, 07:04 PM   #32
ElMiko
Fanatic
ElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileRead
 
ElMiko's Avatar
 
Posts: 536
Karma: 65460
Join Date: Jun 2011
Device: Kindle Voyage, Boox Go 7
Quote:
Originally Posted by icearch View Post
To my test, margin left and right are definitely necessary. Otherwise it would snap to left. And to be sure, you need to do another blank div to enclose all of that, for good measure.
Yes, I agree that the auto L/R margins are necessary. My question was about the center class, though. I haven't observed any difference with it or without it, but that doesn't mean there isn't one...

Last edited by ElMiko; Today at 07:40 AM.
ElMiko is online now   Reply With Quote
Old Yesterday, 07:10 PM   #33
ElMiko
Fanatic
ElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileRead
 
ElMiko's Avatar
 
Posts: 536
Karma: 65460
Join Date: Jun 2011
Device: Kindle Voyage, Boox Go 7
Quote:
Originally Posted by Horus01 View Post
I use this code for poems; it doesn't work in ADE, but it does in Kindle. It functions similarly to the code with `width: fit-content`.

Code:
blockquote.poem {
    display: table;
    margin: 1em auto;
    padding: 0 1em;
  }
Hmmm interesting. I might want to take a little from column a and a little from column b. I take it the L/R padding is to set fixed values rather than the % Max width in RbnJrg's solution.
ElMiko is online now   Reply With Quote
Old Yesterday, 08:14 PM   #34
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 82,407
Karma: 151278869
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by ElMiko View Post
Hmmm interesting. I might want to take a little from column a and a little from column b. I take it the L/R padding is to set fixed values rather than the % Max width in RbnJrg's solution.
If this could possibly be read on a nook or Kobo, do not use that CSS code.

P.S. The CSS code does work in ADE/RMSDK

Last edited by JSWolf; Today at 06:36 AM.
JSWolf is online now   Reply With Quote
Old Yesterday, 08:54 PM   #35
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,465
Karma: 20550481
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
Quote:
Originally Posted by JSWolf View Post
If this could possibly be read on a nook or Kobo, do not use that CSS code.
Are you saying that the Nook and Kobo can’t handle tables either?!??! That sounds like they are pretty useless, and don’t meet standards. It’s time to move on…
Turtle91 is offline   Reply With Quote
Old Yesterday, 09:26 PM   #36
ElMiko
Fanatic
ElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileRead
 
ElMiko's Avatar
 
Posts: 536
Karma: 65460
Join Date: Jun 2011
Device: Kindle Voyage, Boox Go 7
Quote:
Originally Posted by JSWolf View Post
If this could possibly be read on a nook or Kobo, do not use that CSS code.
Why not? What exactly will happen if I use RbnJrg's or Horus01 code?
ElMiko is online now   Reply With Quote
Old Today, 06:17 AM   #37
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 82,407
Karma: 151278869
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Turtle91 View Post
Are you saying that the Nook and Kobo can’t handle tables either?!??! That sounds like they are pretty useless, and don’t meet standards. It’s time to move on…
Yes, the older RMSDK can handle tables. But it was said that the CSS code posted does not work in ADE.

I had a search through ePubs I've read and some do have display: table; in the CSS and they works no problem. I do not see anything in the CSS that @Horus01 posted that does not work in ADE/RMSDK.

Last edited by JSWolf; Today at 06:36 AM.
JSWolf is online now   Reply With Quote
Old Today, 06:37 AM   #38
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 82,407
Karma: 151278869
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by ElMiko View Post
Why not? What exactly will happen if I use RbnJrg's or Horus01 code?
@Horus01 is incorrect. The CSS code he posted does work in ADE/RMSDK. So if you do want to use it, there's no reason not to.
JSWolf is online now   Reply With Quote
Old Today, 07:25 AM   #39
ElMiko
Fanatic
ElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileRead
 
ElMiko's Avatar
 
Posts: 536
Karma: 65460
Join Date: Jun 2011
Device: Kindle Voyage, Boox Go 7
Quote:
Originally Posted by JSWolf View Post
@Horus01 is incorrect. The CSS code he posted does work in ADE/RMSDK. So if you do want to use it, there's no reason not to.
Horus01 is correct. You are mistaken.

The code does not work in ADE 2.X. In fact, it gets REALLY funky. The "auto-centering" fails, but it also then duplicates all the text and displays each line as a separate cell in a row. And the top and bottom margins fail. (Also, with my modified "inline-block" attribution, this doesn't get aligned right, either). See imageADE-H attached.

RbnJrg's code also fails to "auto-center", applying the 85% max-width constraint right-to-left rather than 7.5% on either side. It also ignores the "fit-content" property. See imageADE-RJ attached.

And in my modified code, which steals a bit from RbnJrg and a bit from Horus01, the auto-center effect fails (although in this particular case it gives the illusion of centering because of the right-aligned attribution), as does the "fit-content" property. See imageADE-EM attached.

Spoiler:
Code:
blockquote.bqibEM {
    margin: 1em auto;
    padding: 0 2em;
    display: block;
    width: fit-content; 
	}


However, in both RbnJrg's and my FrankenCode, it doesn't produce any MAJOR readability issues that I can discern. It just doesn't look as nice as it would in an application that isn't total trash.

So, in summary:
1) The only code that you endorsed (other than your own, which didn't address any of the concerns in the original post) has serious readability issues in ADE, which Horus01 rightly pointed out from the jump.
2) The apparent readability of RbnJrg's and my new code (courtesy of RbnJrg's and Horus01's tips & tricks) means that your constant refrain that we use code optimized for ADE 2.X is basically taking the position that ebooks should look mediocre across all platforms rather than looking good in several and mediocre only in ADE. I can comfortably say: this is a weird take.
3) Thank you again to RbnJrg and Horus01 for their help. Teamwork apparently does make the dream work.

EDIT: P.S. in my code snip above, I'm defining the L/R boundaries in em units because I want the max-width to be relative to paragraph indents (which i usually set at 1.5em) rather than the width of the screen. However, if I used % units to define paragraph indents (e.g. "text-indent: 5%;") I think one could basically acheive the same result as RbnJrg's original code by using "padding: 0 7.5%;" instead of the max-width property... I think. I'll let RbnJrg confirm or clarify this, though.
Attached Thumbnails
Click image for larger version

Name:	imageADE-H.jpg
Views:	3
Size:	279.1 KB
ID:	221778   Click image for larger version

Name:	imageADE-RJ.jpg
Views:	3
Size:	327.6 KB
ID:	221779   Click image for larger version

Name:	imageADE-EM.jpg
Views:	3
Size:	331.2 KB
ID:	221780  

Last edited by ElMiko; Today at 09:05 AM.
ElMiko is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Inline-block and float interaction ElMiko ePub 15 08-27-2025 04:01 AM
Inline-block eggheadbooks1 Sigil 3 10-31-2016 03:07 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 09:50 AM.


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