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

Iframe code needs a little help

Discussion in 'General Scripting Chat' started by thehighmind, Jan 11, 2013.

  1. thehighmind

    thehighmind Regular Member

    Joined:
    Oct 24, 2010
    Messages:
    342
    Likes Received:
    56
    Occupation:
    Web Marketer
    Location:
    Location Location Location
    Hello,
    I need a simple cod, maybe a 1 minute job for you.
    Here is what I want to do:
    I want to take thru an iframe code a space from a website (ex: 300x250 px from the website A )
    and show that 300x250 space on a website B thru an iframe code.
    I've made the code and it looks like this:

    <div style="width:300px; height:250px; overflow:hidden;">
    <iframe src=" Link to the site A" frameborder="0" scrolling="no" />
    </div>

    Now the code is working and is taking the first 300x250px from site A, but the only problem is that I want to take
    300x250px from the middle of my website A. So how do I set the iframe the take 300x250 px from site A but the
    possition to be like 500px from top and 300 px from left?
    PS: I'm not talking about the possition of the iframe from site B.

    Have I been clear or should I delete this post? :)
    Thanks in advance for those willing to help
    Skype: prietenultauimaginar
    for instant help :D

    Ok guys,
    I'll edit this post because after many searches I found my answer and I want to share this info with you because someone may need it.
    I was looking for these codes because I want to display ads from a website A on a website B so when someone from site B click the ads it will look like someone from site A click on that add.
    This method was used by people who couldn't display google adsense ads on their website so they took ads from a legal adsense website and display on the website that didn't allow google adsense ads. Now this method will get your account banned, so don't use it. It's only for sharing the knowledge.

    <style type="text/css">
    #outerdiv
    {
    width:300px;
    height:300px;
    overflow:hidden;
    position:relative;
    }

    #inneriframe
    {
    position:absolute;
    top:-312px;
    left:-818px;
    width:1280px;
    height:1200px;
    }
    </style>
    </head>
    <body>
    <div id='outerdiv'>
    <iframe src=" link to your website/link" id='inneriframe' scrolling=no></iframe>
    </div>

    If you have any questions, please ask I will ask.
    For curses and bad words please use PM
     
    Last edited: Jan 11, 2013
  2. thehighmind

    thehighmind Regular Member

    Joined:
    Oct 24, 2010
    Messages:
    342
    Likes Received:
    56
    Occupation:
    Web Marketer
    Location:
    Location Location Location
    Problem solved!