Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 08-01-2018, 11:00 AM   #31
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 6,834
Karma: 62581123
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, and NookColor. 2 Droid, 1 Win8 ePUB rdrs
Quote:
Originally Posted by Turtle91 View Post
The code I mentioned above works for me. However you need to use it properly....short paragraphs...typically only a line or two that you could actually discern as being v-centered - especially on a small screen. There is a difference between position:absolute and position:fixed.
We've been retesting this, because none of us could remember why we weren't using it. Obviously, it was never going to work in KF7 (yes, yes, I know, this is the ePUB subform, not mobi, but, shrug, realistically....). We're having unexpected (and not great) results in the Paperwhite family of devices, and of course, as someone else mentioned, ADE seems to not love it, either.

Will report more later.

Hitch
Hitch is offline   Reply With Quote
Old 08-01-2018, 01:57 PM   #32
RbnJrg
Guru
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 891
Karma: 3273787
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
The best way to center an image in a "box" (any box, body, div, etc., etc.) is to set the picture as background of the box. It's easy to control the size and the position (virtually one can put the image wherever, not only in the center). I had posted the method a couple of month ago and it works flawlessly under ADE:

https://www.mobileread.com/forums/sh...54&postcount=3

In the post appointed by the previous link, I chose as "background-size: contain" but one can use any size. The same with position. In the post I chose "center top" but one can use "center center" or "10% 65%" or whatever.

In readers based on Webkit (that is, Kindle, but only modern Kindles, those ones who support .kf8 because this method is not for K2 or KDX -I must say this since otherwise Hitch will be angry with me ), it's neccesary for us to add the property "background-attachment: fixed;" and all will work perfectly. Also that property must be added to work in Sigil (but beware, if we add the property in RMSDK/ADE engines, then the method won't work).

Last edited by RbnJrg; 08-01-2018 at 02:03 PM.
RbnJrg is offline   Reply With Quote
Advert
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Center a cover image Crusader Sigil 2 10-18-2009 08:51 AM
Using Bookdesigner...Center title up and down davers LRF 5 04-24-2009 09:53 AM
How to center 10% hr on ADE/PRS505 Ankh ePub 5 04-16-2009 10:05 PM
Support center iRex ce3po iRex 3 12-21-2007 07:52 AM
Mobipockets v6.1 is up in the beta center penty Bookeen 4 11-06-2007 06:31 PM


All times are GMT -4. The time now is 02:36 AM.


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