html - Import single element from different website by ID -


i import specific element website website. example, i'd import this:

<div id="mainbar-full"> ... </div> 

from this website foo.stackoverflow.com/bar . should iframe, not showing whole page part of it.

is possible this?

-cerdo

you can iframe, not particularly clean solution cannot think of other way of doing it.

you wont able use stackoverflow page stackoverflow have website set allow same domain iframe requests, understand use in example.

here example using id , url mentioned:

<iframe src="http://stackoverflow.com/tour/#mainbar-full" scrolling="no" class="iframe"></iframe> 

you need set following css whole contents:

.iframe {     height: 4555px;     width: 980px;     overflow: none; } 

this show entire contents of element on page.

as said above, not feel clean solution can think of @ moment.

here working example buzzfeed: http://jsfiddle.net/kyzzk/

cheers.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -