Jump to content

Iframe Problem


mssakib

Recommended Posts

Hi

 

I am using iframe to show a part of a website (not my  own site)

 

 

but for a unknown reason the iframe is showing once. How many iframe may i put it is only showing once

 

here is code

 

 

<style>

#idiv {overflow:hidden; width:740px; height:120px;}

#iframe {width:1000px; height:270px; border:none; margin-left:-120px;margin-top:-130px;}
</style>


<div id="idiv">
  <iframe id="iframe" scrolling="no" frameBorder="0"
  src="http://itleech.com/index.php" /> 

</div> 
<br />
<div id="idiv">
  <iframe id="iframe" scrolling="no" frameBorder="0"
  src="http://itleech.com/index.php" /> 
</div> 


Link to comment
Share on other sites

You need to give each iframe a unique ID, same should go for your div's, but most browsers can work arround that. If you are using a div more than once on a page it should be a class not an id that you call it with.

 

With proper coding you don't need iframes - the div it's self can show content from other pages.

Link to comment
Share on other sites

Here is it

 


<style>

.idiv {overflow:hidden; width:740px; height:120px;}
.idi {overflow:hidden; width:740px; height:120px;}

#iframe {width:1000px; height:270px; border:none; margin-left:-120px;margin-top:-130px;}
#ifram {width:1000px; height:270px; border:none; margin-left:-120px;margin-top:-130px;}
</style>


<div id="idiv">
  <iframe id="iframe" scrolling="no" frameBorder="0"
  src="http://itleech.com/index.php" /> 

</div> 
<br />
<div id="idi">
  <iframe id="ifram" scrolling="no" frameBorder="0"
  src="http://itleech.com/index.php" /> 
</div> 


Link to comment
Share on other sites

You can't self close an iframe. here's the working code:


<style>

.idiv {overflow:hidden; width:740px; height:120px;}
.idi {overflow:hidden; width:740px; height:120px;}

#iframe {width:1000px; height:270px; border:none; margin-left:-120px;margin-top:-130px;}
#ifram {width:1000px; height:270px; border:none; margin-left:-120px;margin-top:-130px;}
</style>


<div class="idiv">
  <iframe id="iframe" scrolling="no" frameBorder="0"
  src="http://itleech.com/index.php"></iframe> 

</div> 
<br />
<div class="idi">
  <iframe id="ifram" scrolling="no" frameBorder="0"
  src="http://itleech.com/index.php"></iframe> 
</div> 

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.