Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Oct 2009
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts

    problem with <div>

    Hi
    i have some div tags in my site . first div is for the content of the page and the others are for the right and left menu and the content , but my problem is this that when the content became more and more , the content div hasn't bigger and I must give the height value for the content by hand and it is not good ,

    how can solve it ?

    thanks

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,749
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Hello hno2005,
    It sounds like have not cleared your floats. If you add overflow:auto; to the div that contains your other divs your floats will clear and it should grow with your content.

    Here is a page that shows how it works.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •