Treehouse: Grow your CSS skills. Land your dream job.

Page wrap

  • # June 15, 2010 at 7:12 am


    I am new to this forum and have a problem that i cant solve. Namely i have problem with div page wrap witch is 1000px and div main-content i have set all content inside it but when i try to set its background color its shown on mozila as 1000px width and 3px height even thou all content is inside it.
    I tried finding in html maybe i didnt close the div tag but all seams fine, have to mention that i am complete amater with coding. But probably you would see it by your selves when seeing my coding.I have uploaded it here . Thank you in advance.

    # June 15, 2010 at 12:04 pm

    Hi there and welcome to the forum. Unfortunately, not many people (if any) are going to take a chance at downloading a file that you’ve uploaded through a third party service. I’d recommend providing a link to a live server that shows your problem.

    # June 15, 2010 at 1:02 pm

    Add this to your CSS:

    .clear { clear: both; }

    And change the very last part of your HTML to this:


    # June 16, 2010 at 5:41 am

    Thank you so much it helped me so much.

    # June 17, 2010 at 4:00 am

    This issue usually occurs with floated items in a div that has no set height.

    Using ‘clear’ is good.

    You can also set your containing page wrap to position: relative AND float: left

    This always solves the issue for me in Firefox.

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

You must be logged in to reply to this topic.