'wrapper' div NOT resizing according to page height - so background issues

Discussion in 'HTML & Website Design' started by geekabhinav, Jul 18, 2010.

  1. #1
    I have designed an XHTML 1.01 + Css webpage but the outermost div i.e. wrapper is not resizing it's height according to contents on page.
    here's the CSS for wrapper:

    body {
    	padding : 0;
    	margin : 0;
    	font : 12px Verdana, Arial, sans-serif;
    	color : #000000;
    	background:#F8ECEC;
    }
    #wrapper {
    	width: 950px;
    	margin: 0 auto;
    	background-color:#FFF;
    }
    Code (markup):
    This wrapper div gives white background to my webpage.
    then on the inside I have many divs and all making a long page.

    Whats surprising is the wrapper ends somewhere in the middle of page, below navbar(the white background stops there),
    I tried inserting "height:2000px" in wrapper's css and it worked.. but thats not how it should be as heights aren't fixed.
    Please help ASAP.
     
    geekabhinav, Jul 18, 2010 IP
  2. geekabhinav

    geekabhinav Member

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #2
    Untitled-1.jpg look how the white color ends below Navigation bar... whereas there is still contents.
    I've seen the code, <wrapper div> ends at last only.just above </body>
     
    geekabhinav, Jul 18, 2010 IP
  3. Masterful

    Masterful Well-Known Member

    Messages:
    1,653
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    140
    #3
    We can't help you without seeing either the actual page or the code, both HTML and CSS.
     
    Masterful, Jul 18, 2010 IP
  4. geekabhinav

    geekabhinav Member

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #4
    Problem got fixed.
    I had omitted "clear:both"
     
    geekabhinav, Jul 18, 2010 IP
  5. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #5
    There is no such thing as XHTML1.01
     
    drhowarddrfine, Jul 18, 2010 IP
  6. My220x

    My220x Member

    Messages:
    624
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    35
    #6
    Thought it would be to do with this.

    This
     
    My220x, Jul 18, 2010 IP