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 12-25-2012, 05:16 AM   #16
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: 6,253
Karma: 4801165
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
This part of CSS3 looks more promising, though.
Jellby is offline   Reply With Quote
Old 12-25-2012, 02:27 PM   #17
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.
 
Posts: 311
Karma: 1028382
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
Quote:
Originally Posted by Jellby View Post
The example says:

Code:
img { move-to: page-top; } /* move images to page-top */
@page { padding-top: 10em; } /* leave a gap at the top of the page */
body:after { /* place a box at the top of each page */
  position: fixed; top: 0; left: 0; right: 0; height: 10em;
  content: pending(page-top); /* insert the images moved to page-top */
}
"page-top" is not some special keyword, it's just an identifier, it could say "foobar" instead, so the img is simply moved to wherever we specify "pending(page-top)", and I don't see how we could say we want it at the next (or current) page top. Reading the rest of the example (@page and body:after), what is actually achieved, if I'm not mistaken, is that all images in the document are collected and placed at the top of every page, and with absolute positioning, which required adding manual padding.
It's just an example, and is not the only way you can use the properties. A more realistic example would target the images more precisely, e.g. with img.floattotop (or even .floattotop) instead of img.

Likewise, a more realistic example would specify the width of the box, but would not specify the height. The pseudo-element would then either be zero height (if there are no images to float) or nonzero (the height of the floated images for that particular page).

Finally, it would not place every image on every page; it would place only the images since the last time you called pending with the specified identifier. Section 5 has this to say about the move-to property:

Quote:
The element is not displayed at the current location, but at the next occurrence of 'pending(<identifier>)' (where the identifiers match), with all other elements moved to that point, in document order. If at the end af the document (after the '::after' pseudo-elements of the root element) there are outstanding elements, then they are all inserted in document order at that point.
(Presumably it means "with all other matching elements". Oops.) The main purpose of move-to is to allow you to easily place footnotes at the bottom of each page.

That said, it would always be displayed at the pending call after the image, so if you wanted the image to float upwards instead of floating to the next page, you'd have to do something else.

Last edited by dgatwood; 12-25-2012 at 02:32 PM.
dgatwood is offline   Reply With Quote
 
Advertisement
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to convert a scanned page from a book (looks like photo of page) to clean text? neuvivlio Workshop 34 11-29-2012 10:05 AM
Need help w/very simple task: page of Word text > Kindle text I can share w/friends kearnine Conversion 1 10-17-2012 09:25 PM
image on separate page without half-page text next Toxaris ePub 2 01-26-2011 04:32 AM
Double tap doesn't zoom images full screen nonsequito Apple Devices 0 01-15-2011 06:03 PM
Error text overwrites page text? troymc Sigil 6 07-07-2010 10:07 PM


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


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