www.webdeveloper.com
Results 1 to 4 of 4

Thread: Float overlap

  1. #1
    Join Date
    Sep 2009
    Posts
    51

    Float overlap

    I created two divs in my page, and floated them both to the left so div1 is on the top left, and div2 is immediately to the right of it.
    The contents are as follows:

    HTML Code:
    <div id="div1">
       <form>
       </form>
    </div>
    
    <div id="div2">
       <iframe />
    </div>
    The problem is that when I resize the browser window, the two divs float together so that div1 overlaps div2.

    How can I have that not happen?

    I would like to the form div (div1) and the iframe div (div2) to stay the same width, div2 immediately to the right of div1.

    Thanks.

  2. #2
    Join Date
    Jan 2005
    Location
    Frankfort, KY, USA
    Posts
    6,167
    Are you using absolute positioning?

  3. #3
    Join Date
    Apr 2006
    Location
    Houston
    Posts
    1,374
    A CSS question without actually showing any of the CSS ?

    If you want the div's to stay the same width then just set their widths.

  4. #4
    Join Date
    Sep 2009
    Posts
    51

    Resolved

    You are right of course - thank you for the input.
    I abandoned the floating and just set absolute positioning with offset. And fixed width.

    Sorry for the no CSS - there wasn't almost any - just floated two divs to the left.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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