Reputation: 5770
Doing some css, so threw this quick fiddle together to show the issue I am having.
http://jsfiddle.net/ozzy/LJKsA/
The div block in center of the demo, is overlapping the container div.
Can you suggest a fix for this please, it always trips me up.
The center div can be larger as content is added, so outer div container needs to handle this also, and retain margins
Upvotes: 0
Views: 149
Reputation: 53606
You can add clear: both
to the last element inside the containing div.
Upvotes: 3
Reputation: 9487
This is asked 10 times a day on StackOverflow. It's because you're using float
ont he children of the container div. Just impleemnt overflow:hidden
to it and it should work.
Search more about clearfix, also.
Upvotes: 0