Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Embed webpage within a webpage..

Featured Replies

Hi,

I am trying to embed a section of a webpage, I have used this code:

 

<object
data=http://www.web-source.net width="600"
height="400"> <embed src=http://www.web-source.net
width="600" height="400"> </embed> Error: Embedded
data could not be displayed.
</object>

 

Which works, but how can I change the positioning of the embed. Lets say I want to embed the footer, how would that be done? Can I change the position of the embed?

 

Thanks

Thanks for your reply...

 

I actually only want that area visible, I dont want to see the header

Then you're going to have to use a dynamic language such as PHP to grab the contents of it and display the specific parts you need.

If you go for this method you won't even need an iframe.

 

if you have experience with php, i'd suggest this:

 

http://simplehtmldom.sourceforge.net/

  • Author

Then you're going to have to use a dynamic language such as PHP to grab the contents of it and display the specific parts you need.

If you go for this method you won't even need an iframe.

 

if you have experience with php, i'd suggest this:

 

http://simplehtmldom.sourceforge.net/

 

 

Or I can use this:

 

<html>

<div style="position: absolute; left: 0px; top: 0px; border: solid 2px #555; width:100%; height:332px;">

<div style="overflow: hidden; margin-top: -100px; margin-left: -25px;">

</div>

<iframe src="http://www.eliteleague.co.uk/stats/schedule.php" scrolling="no" style="height: 900px; border: 0px none; width: 100%; margin-top: -200px; margin-left: -1px; ">

</iframe>

</div>

</div> </html>

When you are embedding external webpages using iframes or objects. I dont think it's possible only to display a only part of the page as the content don't exist in your documents DOM. With AJAX you can load partial external content but only from files from the same url. Maybe you can get the iframe to scroll automaticly to the content by putting an id reference in the iframe src attribute like this:

<iframe src="http://www.externalurl.com#specific_id">

I don't know if i will work just a thought...

Edit: If it works you could "hide" the rest of the embedded content using width and height propperties and overflow:hidden; on the iframe

Edited by Nillervision

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.