Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 07-23-2014, 09:20 AM   #16
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: 79,758
Karma: 145864619
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 Jellby View Post
Of course not. It only means that the code is ADE-only (and non-compliant).
Besides, it "assumes" that the text's height is more or less 4% of the screen. Increase the font size considerably (or make the text several lines long) and it will not be centered (or ADE is even more broken).
I never said the CSS code is perfect, only that it works as written. There is no easy way to center vertically especially when someone changes the font size.
JSWolf is offline   Reply With Quote
Old 07-23-2014, 09:24 AM   #17
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,356
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by Jellby View Post
Unfortunately, there's no reliable and compliant way of setting the SVG to full screen height. "height:100%" may work in most real-world readers, but that's not guaranteed.
Nothing in life (and particularly in ebook rendering) is ever guaranteed. I know of no reader that supports svg where height:100% does not work provided you use a single html file with only the one svg image in it, as is shown in the demo I linked to.

As for compliance, my views on compliance are well known.
kovidgoyal is offline   Reply With Quote
Old 07-23-2014, 09:59 AM   #18
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by kovidgoyal View Post
As for compliance, my views on compliance are well known.
eschwartz is offline   Reply With Quote
Old 07-23-2014, 11:09 AM   #19
p_nut33
Member
p_nut33 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Sep 2013
Device: asus tf300
Wow, and I thought I wasn't gonna get any answers. Thanks!
p_nut33 is offline   Reply With Quote
Old 07-23-2014, 11:18 AM   #20
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,549
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by kovidgoyal View Post
Nothing in life (and particularly in ebook rendering) is ever guaranteed. [...] As for compliance, my views on compliance are well known.
Of course, with "guaranteed" I mean "guaranteed in (hypothetical) spec-compliant readers". The point with compliance is that if you make sure the code is compliant and it fails, you can blame the others. In practice it gives little more than personal satisfaction.

Quote:
I know of no reader that supports svg where height:100% does not work provided you use a single html file with only the one svg image in it, as is shown in the demo I linked to.
Not a reader per se, but the HTML-to-PDF renderer Prince does not work nicely with "height: 100%" in any situation I could find.

Anyway, any of the suggested solutions are probably good enough in most situations, I just expect the original poster (and anyone else reading this) to understand why and how it may fail.
Jellby is offline   Reply With Quote
Old 07-23-2014, 11:53 AM   #21
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,356
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Sure, blaming someone else is always nice

But finding practical solutions that do the best that can be done is better.

Offtopic and just FYI, calibre's HTML to PDF conversion supports height:100% and indeed almost all the arbitrarily bad CSS/HTML you can throw at it perfectly well, one of the main advantages of using a browser engine to do the rendering of the HTML.
kovidgoyal is offline   Reply With Quote
Old 07-25-2014, 02:02 AM   #22
p_nut33
Member
p_nut33 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Sep 2013
Device: asus tf300
Well, I tried the code provided by JS and it didn't work.

That sucks.
p_nut33 is offline   Reply With Quote
Old 07-25-2014, 04:30 AM   #23
odedta
Addict
odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.
 
Posts: 398
Karma: 96448
Join Date: Dec 2013
Device: iPad
Quote:
Originally Posted by p_nut33 View Post
Well, I tried the code provided by JS and it didn't work.

That sucks.
The closest way to center something horizontally is using margin-top:50% and that should look good. Bascially the margin-top is set through the width of the screen so in some readers it will look good in orders less.
You can try that in Calibre while you're changing the screen size.
odedta is offline   Reply With Quote
Old 07-25-2014, 04:31 AM   #24
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by odedta View Post
The closest way to center something horizontally is using margin-top:50% and that should look good.
The OP does not want to centre something horizontally - that's easy. They want to centre it vertically. That's what's not so easy!
HarryT is offline   Reply With Quote
Old 07-25-2014, 08:32 AM   #25
odedta
Addict
odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.
 
Posts: 398
Karma: 96448
Join Date: Dec 2013
Device: iPad
Quote:
Originally Posted by HarryT View Post
The OP does not want to centre something horizontally - that's easy. They want to centre it vertically. That's what's not so easy!
That's exactly what I meant, I got confused with the words hehe. You can see margin-top
odedta is offline   Reply With Quote
Old 07-25-2014, 08:44 AM   #26
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: 79,758
Karma: 145864619
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 p_nut33 View Post
Well, I tried the code provided by JS and it didn't work.

That sucks.
What program did you use the code with? I did say it was tested with ADE.
JSWolf is offline   Reply With Quote
Old 07-25-2014, 09:32 AM   #27
p_nut33
Member
p_nut33 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Sep 2013
Device: asus tf300
Quote:
Originally Posted by JSWolf View Post
What program did you use the code with? I did say it was tested with ADE.
I use dreamweaver and then put it through calibre.

I tested it on my android tablet using some default eBook viewer called MyLibrary (asus) and google books. Google books apparently converted it to some other format because I lost the table of contents.

I also used Calibre's viewer.

I'd like to add that under certain reader dimensions it kind of works but more by taking up the whole page.

Pardon my ignorance but whats ade? * Nevermind * Digital Editions

I just installed ADE and it worked, dang it, why won't it work everywhere.

Oh, and thanks anyways.

Last edited by p_nut33; 07-25-2014 at 12:01 PM.
p_nut33 is offline   Reply With Quote
Old 07-25-2014, 01:00 PM   #28
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,549
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by p_nut33 View Post
why won't it work everywhere.
See post #5
Jellby is offline   Reply With Quote
Old 07-25-2014, 05:45 PM   #29
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: 79,758
Karma: 145864619
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 p_nut33 View Post
dang it, why won't it work everywhere.
Because not every program is programed the same. A lot of these smaller no-name programs just don't work well. Even some of the name programs don't work well. Even a popular program such as Stanza (iOS) was known to be buggy.
JSWolf is offline   Reply With Quote
Old 07-26-2014, 07:03 AM   #30
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
You have just been initiated into the wacky world of ebooks where NOTHING except plain text works everywhere, where you can't predictably center tables, where too many font changes in the first line of a paragraph of some readers causes them to barf....
mrmikel is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Centering blockquotes ghostyjack ePub 6 07-17-2014 06:07 AM
centering text andreadavison Conversion 1 12-29-2013 02:02 PM
Nook not centering anything. why? kateharp ePub 0 05-11-2011 10:53 PM
Centering PDF nguirado Amazon Kindle 5 10-04-2010 08:45 PM
How to do centering sjohnson717 Calibre 15 02-28-2010 09:20 AM


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


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