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
https://forums.phpfreaks.com/topic/243711-iframe-problem/
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
https://forums.phpfreaks.com/topic/243711-iframe-problem/#findComment-1251305
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
https://forums.phpfreaks.com/topic/243711-iframe-problem/#findComment-1251316
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
https://forums.phpfreaks.com/topic/243711-iframe-problem/#findComment-1251327
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.