Is it possible to create an iframe for a specific part of a page?

Asked

Viewed 2,605 times

0

You can get a specific part of a site by mapping it to an iframe?

I’ve seen some solutions using css, but it doesn’t give the effect of fixing the region.

clip: rect (top, right, bottom, left)

1 answer

2

Yeah, yeah, just put the id of the section you want to appear by default at the end of the url in src. The most you can do is hide the scroll, note that this scroll is not yours, it is the other page that you are importing, you have no control over it. You can however hide it as I did. In this case, by way of example I set that I want the footer to appear

div {
  overflow:hidden;
  display:inline-block;
  }
iframe {
  margin-right:-15px;
  }
<div>
<iframe src="http://www.bbc.com/#orb-footer">

</iframe>
</div>

  • It even works, but it also returns other page content, just by adjusting the scrolling to the specified section.

  • 2

    As @Miguel said, you can’t do more than hide the scroll

  • With Iframe not, but what you could do is know what specific part of the site he wants, and in case you take the information he wants and feed the part of his site that wants this information, this without using Iframe.

  • Do you say take the element with jquery? How to load an external document?

  • And if element does not have an id?

  • @Miguel Teria could fix the frame omitting the scroll bar?

Show 1 more comment

Browser other questions tagged

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