View Full Version : Floats, images, text-wrap --- need advice


GrannyGrump
08-30-2012, 07:15 AM
I started to "do" an illustrated version of Adventures of Huckleberry Finn. I have shamelessly snitched Jellby's code from his illustrated edition of Tom Sawyer. http://www.mobileread.com/forums/showthread.php?t=135679

The chapter-headers are inverted L-shaped images, and floating the text inside the L. When I preview in ADE on PC, unless the browser window is sized just right, the wrapped text slips down and displays under the illustration, leaving a big blank white block where the text should be sitting.

Unfortunately, my Sony reader is out of commission, so I have no reader to test on. Will this failure of the float happen on most readers and reader apps, or is it unique to ADE on the computer?

I hope you have good news for me, this is the only working code I could find to wrap text inside an L-shape. Thanks for your time.

gG

Jellby
08-30-2012, 07:28 AM
Woot!... That was a complicated thing to do, I hope you understand all the bits, but if you don't I can try to explain what I did (but maybe I'd do something different today).

I don't remember if I tried in ADE, but I believe it worked fine in my Cybook, at least (which uses the Adobe engine). I don't think there's any good solution that works with all screen sizes and orientations, but having the text right below the image is a good fallback...

Toxaris
08-30-2012, 07:42 AM
I don't know if that code is comparable to the code that is used in Alice in Wonderland. If it is, I couldn't get it to work on ADE. Haven't tried on my reader though.

mrmikel
08-30-2012, 08:11 AM
As for Sony you can use the Sony Reader Library for PC software to display and it is very close to what is displayed in a Sony Reader.

Attempts at drop caps can fail in older Sonys like my PRS-300. The first line is shoved off the right side of the page and only a fragment of the word is displayed on the right hand side. So it is important to check that this isn't happening.

Jellby
08-30-2012, 08:16 AM
Just tested on ADE under Wine, it works if the window is large enough to hold the whole picture (and a bit more), but not if only part of the picture fits in the window, which makes some sense. Can't try with ADE 1.8, and probably it would be the same (text not wrapping) in my Orizon with landscape orientation.

Toxaris
08-30-2012, 10:25 AM
Attempts at drop caps can fail in older Sonys like my PRS-300. The first line is shoved off the right side of the page and only a fragment of the word is displayed on the right hand side. So it is important to check that this isn't happening.

I agree that it should be checked. It would not matter if you use ADE or Reader Library, the core is the same.

I don't know how you do dropcaps, but mine work perfectly on my old PRS-300...

mrmikel
08-31-2012, 08:00 AM
Some of the epubs at gutenberg.org.ca use a style of dropcaps that cause this problem. When I get to my other computer I will try to post an example of the CSS. I end up just making a large (150%) first letter and that does work. It seems to have something to do with float if I recall.



This is the CSS :
.dropcap {
float: left;
font-size: 2em;
line-height: 1.2;
padding-right: 3px;
width: auto
}

GrannyGrump
09-01-2012, 02:53 AM
Guys, thanks for responding. It sounds as though it is a fairly widespread problem, so I guess I will have to live with it.

@ mrmikel, yes, I would love to use Sony reader software on my pc. Unfortunately, it seems as though you must be online to install it, and I have no access to an internet computer with administrator rights (no connection at home). I have googled and binged unsuccessfully to find a procedure to install offline.

@ Jellby --- Complicated? That is an under-statement, I am still cross-eyed from drilling through the divs and images. I did simplify it by eliminating the div.middle: I am doing the unthinkable, and deleting the "chapter first word" that is integrated in some of the header images. That gives me a bit easier package to work with (one less pixel dimension to track).
I would be curious to know if you would handle it differently now, and what you would do.

To all, thanks again checking for me.

gG

mrmikel
09-01-2012, 08:04 AM
You can try:
http://esupport.sony.com/US/p/model-home.pl?mdl=PRS300&LOC=3#/downloadTab

GrannyGrump
09-06-2012, 06:13 AM
@ mrmikel Whee! thanks!!! Who knew that installing from the Sony reader is a different process than downloading a stand-alone installer file? Well, probably lots of folks, just not me.

I now have working Sony reader software on my desktop, happy happy happy!

Thanks again

gG

mrmikel
09-06-2012, 08:28 AM
There is another piece of Sony software from the same site that does pretty much the same job, BUT it wants to keep everything in sync. If you use standard locations for everything, it mostly causes no problem. But if you create your own places for storing ebooks, etc, then it can create a resolvable mess which is more annoying than anything. Just a heads up in case things seem to be kind of sideways.

Both work fine for display.

You're welcome, welcome welcome! (the echo is from crossing the international date line...lol)

JSWolf
09-06-2012, 10:14 AM
I only use Reader Library to view how an ePub will look on my 650. Otherwise, I use Calibre to manage the content.