1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to put a webpage into another webpage?

Discussion in 'Web Design' started by Hawkster, Oct 6, 2015.

  1. Hawkster

    Hawkster Jr. VIP Jr. VIP

    Joined:
    Jun 22, 2013
    Messages:
    3,514
    Likes Received:
    3,730
    Gender:
    Male
    Occupation:
    Listen to everyone - Follow no-one
    Location:
    UK
    Home Page:
    So i need to put a webpage into another webpage, i know it can be done with iframe but i only want a section of the webpage to be on show not the whole page.


    So lets say the webpage im using has a left sidebar, a right side bar, and whatever in the middle, its the middle section i want to display on another webpage.

    Any ideas as to the coding needed?
     
  2. soccerlover

    soccerlover Jr. VIP Jr. VIP

    Joined:
    Jun 12, 2014
    Messages:
    3,406
    Likes Received:
    1,781
    Gender:
    Male
    Occupation:
    Seo Analyst :D
    Location:
    ♥♥♥ BHW ♥♥♥
    Home Page:
    You can use the following code for reference.

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
      "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    
    <style type="text/css">
    <!--
    #container{
        width:100px;
        height:400px;
        border:1px solid #000; 
        overflow:hidden;
        margin:auto;
    }
    #container iframe {
        width:200px;
        height:750px;
        margin-left:-100px;
        margin-top:-350px;   
        border:0 solid;
     }
    -->
    </style>
    
    </head>
    <body>
    
    
    <div id="container">
    <iframe src="http://www.w3schools.com/css/default.asp" scrolling="no"></iframe>
    </div>
    
    
    </body>
    </html>
    
     
    • Thanks Thanks x 3
    Last edited: Oct 6, 2015
  3. wowhaxor

    wowhaxor Elite Member

    Joined:
    Apr 28, 2007
    Messages:
    2,020
    Likes Received:
    3,361
    Location:
    ?¿?
    Home Page:
    You can adjust an iframe by pixels and cropping and display exactly what you want. If you do a search I did a guide on how to iframe out just the input fields from cpa offers (email submits) so it looks like they are entering their email from something else. You can do a search for it here it's many years old and just skip all the faking referrer and stuff but the iframe part will teach you step by step how to frame specific parts of a page perfectly for a total noob.

    Edit: the code above is a good template, you can guess and check coordinates or the program I used to use is called cakeslice to pull out the exact pixels to input into that.
     
    • Thanks Thanks x 2
    Last edited: Oct 6, 2015
  4. Hawkster

    Hawkster Jr. VIP Jr. VIP

    Joined:
    Jun 22, 2013
    Messages:
    3,514
    Likes Received:
    3,730
    Gender:
    Male
    Occupation:
    Listen to everyone - Follow no-one
    Location:
    UK
    Home Page:
    Thanks lads, very helpful!



     
  5. davids355

    davids355 Jr. VIP Jr. VIP

    Joined:
    Apr 25, 2011
    Messages:
    10,423
    Likes Received:
    8,125
    Nice, didn't realize you could do that either...