dk4210 Posted November 2, 2011 Share Posted November 2, 2011 Hello Can some one help me with a problem Problem with my iframe div overlapping another div. http://screencast.com/t/uFdidurNxC <div class="iframe1"> <iframe src="image_upload/main/index.php?test=21" id="MyFrame" frameborder="0" marginheight="0" marginwidth="0" width="900px" height="900px" scrolling="auto"></iframe> <div> <div class="clear"> </div> <div id="adcanvas" class="bldtxt">Place Ad</div> css for both .uploadwrappper { width:800px; margin-left:20px; } .upcontainer { margin: 0 auto; padding: 20px 0 0; width: 960px; } .upload_iframe{ width: 940px; } .iframe1 { height:100px; margin-bottom:5px; width:100%; padding:5px; float:left; position: relative; z-index:1; } #adcanvas2 { background-color:#c6c7c9; width:900px; margin:20px; padding:5px; float:left; position: relative; z-index:1; } iframe { float:left; z-index:1; } How can I get the other div to just move down instead of it over lapping Please advise.. Thanks, Dan Quote Link to comment https://forums.phpfreaks.com/topic/250286-hard-time-with-divs-overlapping/ Share on other sites More sharing options...
sunfighter Posted November 2, 2011 Share Posted November 2, 2011 <div class="iframe1"> <iframe src="image_upload/main/index.php?test=21" id="MyFrame" frameborder="0" marginheight="0" marginwidth="0" width="900px" height="900px" scrolling="auto"></iframe> <div> <============ Doesn't this have to be </div>???????? <div class="clear"> </div> <div id="adcanvas" class="bldtxt">Place Ad</div> Quote Link to comment https://forums.phpfreaks.com/topic/250286-hard-time-with-divs-overlapping/#findComment-1284317 Share on other sites More sharing options...
dk4210 Posted November 2, 2011 Author Share Posted November 2, 2011 Yea I noticed that after wards and fixed it but still having the issue.. Quote Link to comment https://forums.phpfreaks.com/topic/250286-hard-time-with-divs-overlapping/#findComment-1284320 Share on other sites More sharing options...
sunfighter Posted November 3, 2011 Share Posted November 3, 2011 In your HTML you are placing one div (<div id="adcanvas">) below another div(<div class="iframe1">) which will and does work out fine if you define #adcanvas in your css I just changed the #adcanvas1 and get rid of the iframe for now. The problem is your <iframe id="MyFrame"... it's height="500px" makes it out flow the <div class="iframe1"> which has height:100px; and there fore also covers the <div id="adcanvas">. change the .iframe1 height to 500px and things work out Is there anyway you can place your content into a div and not use iframes? It will solve a lot of headaches. Quote Link to comment https://forums.phpfreaks.com/topic/250286-hard-time-with-divs-overlapping/#findComment-1284698 Share on other sites More sharing options...
dk4210 Posted November 3, 2011 Author Share Posted November 3, 2011 That's what I ended up doing and it's working. Thanks for your help! Quote Link to comment https://forums.phpfreaks.com/topic/250286-hard-time-with-divs-overlapping/#findComment-1284711 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.