Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other iframe x,y positioning?

  • This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #38407
    kloy
    Member

    Is there a way to get an iframe to adhere to a set of x,y coordinates?

    I’m trying this on this page and it does not seem to be working..
    http://www.mollymorkoski.com/?page_id=9

    #104062
    Senff
    Participant

    Select your code and then press the little button with the blue brackets and white paper.

    Anyhoo, you might want to put this part in the BODY tag, not the IFRAME tag:

    onload="window.frames.scrollTo(300,300)"
    #104065
    kloy
    Member

    OK, here is the full code…this is a wordpress page…so how would that work?

    #104084
    JoshWhite
    Member

    In the last situation I had to do this, I used CSS to accomplish it. It looked kind of like this:


    #outerdiv {
    width: 500px; position: relative;
    }
    #innerdiv {
    position: absolute; left: -320px; top: -220px;
    overflow:hidden;
    }






    Managed to do the job, but I don’t know if it’s “correct” in terms of design practice lol.

    #104097
    kloy
    Member

    Thanks, but this was moving the entire div over, rather than moving the embedded frame within the inner div???

    #104109
    JoshWhite
    Member

    Ok I see – I missed a step there (had to look it back up :P) – assign the id to the iframe itself:

    #104115
    kloy
    Member

    hmmm… still not working? It keeps on moving the div/frame, not the page within the div/frame.

    #104161
    JoshWhite
    Member

    Check this out here: http://jsfiddle.net/xDU9V/

    does that help at all? If you adjust the negative values of the “innerdiv” you’ll see the content inside the window move around.

    #104201
    kloy
    Member

    AHHHH!! SUCCESS!! THANK YOU!!

    #104296
    JoshWhite
    Member

    Sweet! Glad it helped!

Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘Other’ is closed to new topics and replies.