0

I'm already spending way too much time about two divs placed inside the footer that are placed outside the container for some reason. Checked my HTML and CSS over and over but can't see what's wrong with it.

It's probably a floating/clearing issue or some little typo in my code but I just can't find it. Any help solving this is really appreciated.

The page can be found at http://nionwebdesign.com/dev/check. It's about the 'Bestellen' and 'Info' parts that are placed outside the white container.

Thanks in advance!

NielsPilon
  • 500
  • 2
  • 7
  • 21

3 Answers3

1

Probably you have them floated. Parent elements are never to expand to contain floated elements. To have this do what you want, add overflow:auto to the "container" parent element.

Rob
  • 14,746
  • 28
  • 47
  • 65
1

Here you can find a description of the problem and commented solutions: http://www.quirksmode.org/css/clearing.html

user1498339
  • 629
  • 4
  • 9
  • Thanks for that link, very usefull and answered another question that I had too (about div's not having a height with floated elements in them). PPK to the rescue! – NielsPilon Jul 10 '12 at 20:58
0

This SO answer lists all the best solutions, starting with the more recent "micro-clearfix" one from 2011.

The overflow: hidden solution isn't without its problems, which you may or may not run into depending on your page layout.

What methods of ‘clearfix’ can I use?

Community
  • 1
  • 1
Marcelo De Polli
  • 28,123
  • 4
  • 37
  • 47