mssakib Posted August 3, 2011 Share Posted August 3, 2011 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> Quote Link to comment Share on other sites More sharing options...
Muddy_Funster Posted August 3, 2011 Share Posted August 3, 2011 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. Quote Link to comment Share on other sites More sharing options...
mssakib Posted August 3, 2011 Author Share Posted August 3, 2011 So just call the div with classs and the iframes with 2 unique id would do it ? Quote Link to comment Share on other sites More sharing options...
mssakib Posted August 3, 2011 Author Share Posted August 3, 2011 Tried now working. tried with giving unique ID and class same problem. doesn't show more than once. with one div or 2 Quote Link to comment Share on other sites More sharing options...
Muddy_Funster Posted August 3, 2011 Share Posted August 3, 2011 what's you new code look like? Quote Link to comment Share on other sites More sharing options...
mssakib Posted August 3, 2011 Author Share Posted August 3, 2011 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> Quote Link to comment Share on other sites More sharing options...
Muddy_Funster Posted August 3, 2011 Share Posted August 3, 2011 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> Quote Link to comment Share on other sites More sharing options...
mssakib Posted August 3, 2011 Author Share Posted August 3, 2011 Thx Problem solved. I didn't look at that lol Quote Link to comment 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.