On 15.10.2011 18:06, Bill Walton wrote:
I would like to have a container div that allows the number of
fixed-size divs on each 'row' inside it grow or shrink based on
available space. The need to put these negative margins on the
inside fixed-size divs seems to preclude that. Is this just the
nature of floats?
No, it is not. Floats floated next to each other will naturally align
vertically to the same "line" - no corrective top-margins needed. Unless
you have made a coding-error something must be pushing down across the
top of the container.
Can't dissect your case based only on your description, but you should
try floating the container div too as that will make it _contain_ its
floated children and prevent the effect of "collapsing margins" on
elements outside the container div from affecting elements inside it.
Report back about the result, so we at least can figure out if we need
to see your entire code or not.
regards
Georg
______________________________________________________________________
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/