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.
12-02-2009, 02:22 PM
KDLA
Are you using absolute positioning?
12-02-2009, 03:29 PM
slaughters
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.
12-02-2009, 03:47 PM
romsok
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.