Thread: margin: 0 auto;
View Single Post
Old 07-14-2010, 04:14 AM   #5
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,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by gardefjord View Post
1. Sure, this works but the ePub format doesn't support 0 auto.
The ePUB specification explicitly allows the "auto" value for margins, so it supports it. The bad news, is that it also explicitly allows it to be replaced with "0":

"Reading Systems may set the value of any margin property whose specified value is auto to 0."

Quote:
2. Perhaps we can find a work around that readers do support?
If you set the width of the element as a percentage of page width, you can set the margins to half the remaining percentage. If the centered bit is 40%, you set left and right margins to 30%, so that 30+40+30=100.

Or maybe setting "display: inline" and wrapping it into a <div> with "text-align: center".

For a table, which has a width that by default adapts to its contents, I'm not sure what would work...

You can always write polite emails (but many) to Adobe and Apple
Jellby is offline   Reply With Quote