CSS Container Not Expanding

Discussion in 'CSS' started by ORiN, Mar 14, 2010.

  1. #1
    I coded the main page of the website I am working on. However, the height of the container is not expanding to accommodate the height of the boxes.

    Link http://bit.ly/acnOY7
     
    ORiN, Mar 14, 2010 IP
  2. Wp-Mod.Com

    Wp-Mod.Com Peon

    Messages:
    381
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    your website source shows there are two html closing tags , please delete one , that might do the trick , coz coding as per me is right , there must be a error because of the extra html tag , delete it and tell me
     
    Wp-Mod.Com, Mar 14, 2010 IP
  3. ORiN

    ORiN Well-Known Member

    Messages:
    753
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    130
    #3
    Didn't notice that extra tag. Removed the tag but the container is still not stretching beyond the sider bar box.
     
    ORiN, Mar 14, 2010 IP
  4. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #4
    Parent elements are never to expand to contain floated elements. This is by design. There are a few different ways to get it to expand, however. Google for 'clear floats'. For now, you can add 'overflow:auto' to #container.
     
    drhowarddrfine, Mar 14, 2010 IP
  5. hangbowl

    hangbowl Well-Known Member

    Messages:
    228
    Likes Received:
    3
    Best Answers:
    4
    Trophy Points:
    143
    Digital Goods:
    2
    #5
    How about this,

    
    <html>
     <head></head>
     <body>
      <div id="container">
        <div id="header">
        </div>
        <div id="bodycontent">
          <div id="left">
          </div>
          <div id="right">
          </div>
        </div>
      </div>
     </body>
    </html>
    
    HTML:
    try that arrangement.
     
    hangbowl, Mar 14, 2010 IP
  6. ORiN

    ORiN Well-Known Member

    Messages:
    753
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    130
    #6
    Thanks! 'overflow:auto;' worked! I read somewhere that it is within specifications of CSS on this matter but the article is a couple of years old. Looks like it is still an ongoing issue.
     
    ORiN, Mar 14, 2010 IP
  7. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #7
    It is not an "issue" at all. This behavior is intentional and will never change. It's origins are in SGML and electronic publishing.
     
    drhowarddrfine, Mar 14, 2010 IP