Ways to put one site inside another?

Asked

Viewed 18,816 times

3

I’m studying the tag iframe HTML5, I saw that with it we can place websites and videos within a page. However, I did some testing, with PHP and HTML files. The only way that it worked out that the site I wanted was in the . html file and in the Edge browser.. What is the best way to imply sites within another?

  • 1

    Your question is too broad. iframes has numerous functions, and not just "put one site inside another"... If your "test" worked only on Edge, your code has problems. By the way, iframeis something old and does not belong to HTML5. Good luck buddy!

  • IFRAME Html5?

  • What alternative do you advise for this type of implementation

  • I already used jquery load() . [ http://api.jquery.com/load/ ]

1 answer

5


What you want is to include any site within yours. For this, the tag iframe must solve implemented like this:

<iframe width="1024" height="768" src="http://www.bbc.com" style="-webkit-transform:scale(0.5);-moz-transform-scale(0.5);"></iframe>

And with something like that:

div {
    position: relative;
    width: 624px;
    height: 300px;
    overflow: hidden;
}
iframe {
    position: absolute;            
    top: -95px;
    left: -25px;
    width: 1024px;
    height: 768px;
}
Site externo ao meu:
<div>
    <iframe src="http://www.bbc.com/" scrolling="no" frameborder="no"></iframe>
</div>

Works best here, because Stack won’t allow the opening of the BBC website.

  • It would be better to put as code only, since the stack snippets do not allow the use of iframes.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.