Jump to content

Hard time with div's overlapping


dk4210

Recommended Posts

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

Link to comment
Share on other sites

<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>

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.