View Single Post
Old 08-30-2010, 06:41 PM   #1
jharker
Developer
jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.
 
Posts: 345
Karma: 3473
Join Date: Apr 2007
Location: Brooklyn, NY, USA
Device: iRex iLiad v1, Blackberry Tour, Kindle DX, iPad.
Variable position / anchor for images?

Hey, folks!

I've been playing around with ePub (for iBooks) recently and have run into an interesting problem. I don't have much experience with CSS/XHTML, so it's entirely possible that this is a solved problem. I've searched around a bit but haven't found a solution, so I'm hoping someone here can help me!

The question is: how do I place a floating image into text, in such a way that it's not attached to a particular paragraph?

I want the text to wrap around the image, but I don't really care if the top of the image is aligned with the beginning of a paragraph. I also don't care whether the image is aligned with paragraph A or paragraph B, so long as it stays within a certain range of text (i.e. plus or minus 3-5 paragraphs).

The idea is to avoid those awkward page breaks where there is lots of empty space at the bottom of a page because an image comes next and the image won't fit onto the page. In this situation I want the next paragraph to start and the image to appear at the beginning of the next page (in the middle of a paragraph, if necessary).

Any ideas? All advice is much appreciated!
jharker is offline   Reply With Quote