0
votes

If you change the #container's width to 99px, the blue div will float under the red div because the width is too small.

Is it possible to add a padding or margin so that there is a space between the red and blue divs when the blue div is underneath the red div AND ensure that the top and bottom space (paddding) between the container and the div's remain equal (they are 10px now)?

And if the #container is set back to 100px, both red and blue divs line up perfectly top/bottom?

http://jsfiddle.net/86F2A/49/

1

1 Answers

0
votes

Maybe add margin-bottom to both containers and don't use padding-bottom on the main container.

http://jsfiddle.net/86F2A/52/