Results 1 to 3 of 3

Thread: [RESOLVED] Float / Clear Problems

  1. #1
    Join Date
    Aug 2007
    New Jersey, US

    resolved [RESOLVED] Float / Clear Problems

    Hey guys...
    I'm having a problem with floating objects, maybe someone here can help.

    The basic format of the site is this:

    HTML Code:
    <div id="leftNav">
      left navigation
    <div id="mainContent">
      main content
    #left_nav {float:left; width:14em;}
    #mainContent {width:auto; margin-left:15em;}
    This works fine to have the two columns (navigation on left, all content on right).

    BUT - in the main content, I often have to float elements which means that I also have to clear them. But when I clear anything, it drops below leftNav. Check out the screenshot if it's unclear what I'm talking about.

    I've tried a million different things, including adding float:none; to the mainConent div, but nothing I do works. Does anyone have any ideas?

    Thanks a lot,
    Attached Images Attached Images

  2. #2
    Join Date
    Jan 2005
    Frankfort, KY, USA
    Float the images right, and then clear right.

  3. #3
    Join Date
    Aug 2007
    New Jersey, US
    hmmm... that could work too...

    I posted this on another forum as well, and I was told to try adding overflow:hidden to the mainContent div (it worked perfectly).

    Thanks a lot, KDLA!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Recent Articles