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

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 02-10-2013, 12:47 PM   #1
verydeepwater
Member
verydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 86
Karma: 12586
Join Date: Nov 2012
Device: Ipad and Kindle Fire
Problem with Percentage Measurements

I am working on a fixed layout ebook for Kindle Fire. I am trying to convert all the absolute positioning measurements form pixels to percentages. But I can't get it to work. There is no consistency between Dreamweaver, Safari and Kindle Preview. If I get it right for Safari, it is widely out on all the others. Does anyone have an idea what's happening?
verydeepwater is offline   Reply With Quote
Old 02-14-2013, 04:04 AM   #2
Aerys
Connoisseur
Aerys is faster than slow light.Aerys is faster than slow light.Aerys is faster than slow light.Aerys is faster than slow light.Aerys is faster than slow light.Aerys is faster than slow light.Aerys is faster than slow light.Aerys is faster than slow light.Aerys is faster than slow light.Aerys is faster than slow light.Aerys is faster than slow light.
 
Aerys's Avatar
 
Posts: 51
Karma: 29994
Join Date: Nov 2011
Location: Manila, Philippines
Device: iPad 2 & Nexus 7
Quote:
Originally Posted by verydeepwater View Post
I am working on a fixed layout ebook for Kindle Fire. I am trying to convert all the absolute positioning measurements form pixels to percentages. But I can't get it to work. There is no consistency between Dreamweaver, Safari and Kindle Preview. If I get it right for Safari, it is widely out on all the others. Does anyone have an idea what's happening?
I think that should be normal that your seeing discrepancies by using "percentages" as measurements since the reader/browser is calculating the position based on the size of the window.

The standard on fixed layout book is to use pixel measurement.
Aerys is offline   Reply With Quote
Old 02-15-2013, 02:05 AM   #3
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
Quote:
Originally Posted by Aerys View Post
I think that should be normal that your seeing discrepancies by using "percentages" as measurements since the reader/browser is calculating the position based on the size of the window.

The standard on fixed layout book is to use pixel measurement.
Depends on the elements that contain the element you're styling and on what property the percentages are being applied to:
  • Font sizes measured in percentages are relative to the previous size, and should be reasonably safe.
  • Percentages for things like width or height of an element are relative to the size of the enclosing container. If that enclosing container is not a fixed size, then neither is a percentage of that size. If it is a fixed size, then a percentage of that size should always be the same.
dgatwood is offline   Reply With Quote
Old 02-15-2013, 04:01 AM   #4
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,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
And percentages in vertical margins are relative to the width of the element, not height.
Jellby is offline   Reply With Quote
Old 02-15-2013, 07:14 AM   #5
verydeepwater
Member
verydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 86
Karma: 12586
Join Date: Nov 2012
Device: Ipad and Kindle Fire
Quote:
Percentages for things like width or height of an element are relative to the size of the enclosing container. If that enclosing container is not a fixed size, then neither is a percentage of that size. If it is a fixed size, then a percentage of that size should always be the same.[/LIST]

That's helpful, thanks. When I added 'position:absolute' to the body tag in the CSS, I mostly solved the problem. I also understand, you need to add the page size in pixels. In some contexts I have seen the page size added to the body tag and sometimes to a div tag, which is used on each page to set the size. Does it matter which way you do it or is this a difference between epub and mobi versions?

The reason I ask, is that I have completed a fixed layout eBook, with the page dimensions added to the body tag, and with a separate div tag for each page, which I have used to identify and format all the elements on each page. I suppose, I should also add in the CSS width and height to each of these divs, but when I do it doesn't seem to make any difference. I still have the problem that there is a slight variation in the flow of the text, when I transfer the file from my computer to my Kindle Fire.

Last edited by verydeepwater; 02-15-2013 at 07:15 AM. Reason: to make clear
verydeepwater is offline   Reply With Quote
Old 02-19-2013, 11:08 AM   #6
HYPE
Groupie
HYPE ought to be getting tired of karma fortunes by now.HYPE ought to be getting tired of karma fortunes by now.HYPE ought to be getting tired of karma fortunes by now.HYPE ought to be getting tired of karma fortunes by now.HYPE ought to be getting tired of karma fortunes by now.HYPE ought to be getting tired of karma fortunes by now.HYPE ought to be getting tired of karma fortunes by now.HYPE ought to be getting tired of karma fortunes by now.HYPE ought to be getting tired of karma fortunes by now.HYPE ought to be getting tired of karma fortunes by now.HYPE ought to be getting tired of karma fortunes by now.
 
HYPE's Avatar
 
Posts: 178
Karma: 1057078
Join Date: Dec 2012
Device: Kobo Aura One
Setting a fixed size on the body or on a main div should both work independently of the format.
HYPE is offline   Reply With Quote
Reply

Tags
absolute positioning, percentage measurements, pixels

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Screen measurements? cBird enTourage Archive 3 04-18-2011 09:57 PM
PRS-600 600 measurements Wordeater Sony Reader 2 02-05-2011 03:35 PM
measurements Please artemisblossom Sony Reader 3 05-18-2009 11:55 PM
I need measurements Kirari Sony Reader 7 05-11-2009 09:14 PM
PRS-500 PRS-500 power consumption measurements rothe957 Sony Reader Dev Corner 27 01-09-2008 04:07 AM


All times are GMT -4. The time now is 07:39 PM.


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