Previous Message
Next Message

Must I resort to a table for this?

Sent by Ben Henick on 4 December 2004 13:01


On Fri, 3 Dec 2004, David Graham wrote:

> If the caption exceeds the width of the pic, I want the caption text to 
> wrap no wider than the width of the pic. If I put the pic and the 
> caption in a table, then the table expands to the width of the pic and 
> the text wraps at that point. If I use a CSS approach and put the pic 

I'd like to see *that* - I was under the impression that a table would do 
the same thing as your notional div.

> and caption into a div, the div continues to stretch as far as the text 
> goes (or until it hits the edge of a parent container).
> 
> It looks like the only way I can do this with CSS is to fix the width 
> of the div, but I there's no built-in FileMaker function that I can use 
> to derive the width of the pic. I really don't want to use a table for 
> this for obvious reasons, but I'm stuck. Help!

....It surprises me that the photos aren't constrained to a preset height 
or width (depending on their aspect ratioes).  But I digress.

There's no broadly-supported, consistent way to do what you're asking 
for... without scripting.  *sigh*

That thumping you hear is the sound of me kicking Internet Explorer.

The script itself isn't that hard to write or comprehend; if you want an 
example reply offlist.


-- 
Ben Henick                "In the long run, men hit only what they aim
Sitebuilder At-Large       at.  Therefore, though they should fail
http://www.henick.net/     immediately, they had better aim high."
[EMAIL-REMOVED]       -- Henry David Thoreau

______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread:

Possibly related: