Michael ORourke wrote:
> Hello all,
> 
> I have a container holding 6 floated divs, each containing an image and a
> few lines of text. My first goal was to be able to center all the floats so
> they take up all the space in the containing div which I think I
> accomplished. The test page is here:
> http://www.basalweb.com/test/dltest3.html.
> 
> The problem I have now is that the number of those floated divs won't be
> constant. There will be anywhere from 1-6. Is there any way to have them
> always display centered in the containing div without editing the width in
> the css or do I have to resort to JS for this? The floated divs don't
> necessarily have to take up the entire space, it's more important that
> they're centered.

This is an interesting thing to try. I think the key is to create an 
inner wrapper div to contain the individual blocks, and from there, I 
got thrown for a loop trying to decide on whether to go with a width of 
auto to allow it to expand according to the cumulative widths of the 
item blocks OR give it a width that would expand to the overall 
containing block and attempt to pad the inside left and right.

If I wasn't at work right now, I'd explore it further. Good question!!

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to