Grow your CSS skills. Land your dream job.

wrapper div not expanding to contain elements

  • # January 30, 2009 at 9:53 pm

    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: http://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

    # January 30, 2009 at 10:18 pm

    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.

    # February 2, 2009 at 7:50 pm

    use div{clear:booth} before the end of the div wrapper

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".