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 4 of 4
  1. #1
    Regular Coder
    Join Date
    Oct 2002
    Location
    USA
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question <div> float problem in the layout

    Below is the basic outlook of my site.

    However, I have slight problem with the footer.

    Since id="column2" has a "float:left" attribute, my footer is floated under the end of column2.

    How can I avoid that?

    Thanks.

    -----------------------------------
    <div id="container">

    <div id="header">HEADER</div>

    <div id="columns1">
    CONTENT IN COLUMN 1
    </div>

    <div id="columns2">
    CONTENT IN COLUMN 2
    </div>

    <div id="footer">FOOTER</div>

    </div>

  • #2
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    Don't forget to clear your floats. Add "clear: both" to the footer, or insert an empty block-level element (like a div) after column two with the clear property in the CSS.

  • #3
    Regular Coder
    Join Date
    Oct 2002
    Location
    USA
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts
    richard,

    thank you very much.

    your help came very quickly when I was pushed by time.

    I appreciate it.

  • #4
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    No problem... glad I could help


  •  

    Posting Permissions

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