treehouse : what would you like to learn today?
Web Design Web Development iOS Development

wrapper div not expanding to contain elements

  • Hi,

    I have huge problems with layouts. This site and page is a case in point. I had it "working" but apparently changed something that screwed at least one page up: www.hhs-cheer.com/booster.html

    The wrapper div isn't containing the main content div... it's all jacked up. I'm not even sure what to try. I thought maybe the floated elements were screwing it up; i know sometimes that can be a reason elements will go outside a container div; but i haven't been able to fix it. I've tried adding a superflous div with a clear: left or whatever, but that hasn't helped.

    Any thoughts?!

    Thanks!

    James
  • I'm not exactly sure what you intended your footer to look like, but if you add "overflow:auto" to your .main-content div, it will properly enclose the elements.
  • use div{clear:booth} before the end of the div wrapper