Long caption = no caption on small screens?

Page: 1

Author Post
Member
Registered: Nov 2008
Posts: 11
Me again,

I have a floatbox image with a pretty long caption. On my screen at 1280x1024 it shows just fine - but on smaller screens, the caption is omitted.

I guess it's considered normal behavior - but is there any way to force the caption without shortening the text itself?

Thanks for your help!
David.
Administrator
Registered: Aug 2008
Posts: 3382
If there's not enough room to reasonably display a caption, it will be hidden. But the threshold is quite small. 80 pixels. You have to be showing a pretty small floatbox to not have 80px available for the caption. The length of the caption should have no bearing on this behaviour because captions will wrap as required.

From what you say, I don't think you're dealing with tiny boxes < 200px wide. And if not, then this is another case of "I'd have to look at it" to determine what's going on.
Member
Registered: Nov 2008
Posts: 11
Hey there,
well, that's strange. Please, have a look: http://sinfonium-weimar.de/grussworttest.htm

On IE and Minefield, on 1280 x 1024 it just shows fine. On smaller resolutions (or even resizing the browser window a bit and then opening the floatbox) the caption is not shown. Can you reproduce it?

Maybe it's just a dumb mistake of someone new with your great floatbox, but any help would be highly appreciated!

Kind regards,
David.
Administrator
Registered: Aug 2008
Posts: 3382
Hi David,
When you said you had a long caption I had no idea you meant THAT long!

Bottom line, a caption of that size can not interact gracefully with auto-sizing of an image. The problem is not so much with width, but with the height. Auto-sizing is done in a multi-pass iteration that adjusts the width and height to find the right dimensions. The challenge with long captions is that as the width is adjusted, the height changes because the caption wraps to a different number of lines. Each time the height is decreased to fit vertically on the screen, the width is decreased the same proportion to keep the image undistorted. This width decrease causes more caption wrapping which negates the vertical shrinkage done. In the case of your caption, when it does not display, that is because there is no proportional resizing of the box that can be done to keep it all on the screen vertically.

You can see this in action by gradually resizing your browser vertically near the boundary of where the caption shows and doesn't show. You should be able to get some silly looking skinny boxes that show that there is no size that will allow the whole caption on the screen. You will also get some flawed and broken floatbox renderings right around the critical browser height.

Things you might want to consider:
Set autoSizeImages to false and let people scroll to read the caption.
Or, display the image and text as a scrollable iframed page and give the text more room on that html page. (Maybe use width:max and height:max for the iframe.)
Note that with the large caption in the current setup, the close button gets kind of lost and also takes up a bunch of that precious width. You could move it out to the top by setting controlPos:tr

Good luck...
Member
Registered: Nov 2008
Posts: 11
I am amazed at the speed and depth of your support! Thank you for your help, it is highly appreciated! I indeed changed autosizeimages and the controlPos, and it's working a lot better now.

It's good to know where the problem is.

Thanks a bunch again!

Page: 1