Quick iFrame Question

Discussion in 'Web Design and Development' started by Aperture, Oct 7, 2008.

  1. Aperture macrumors 68000

    Aperture

    Joined:
    Mar 19, 2006
    Location:
    PA
    #1
    I'm trying to make an iFrame to display a piece of a website on another page. The problem is that the piece of the site that I would like to display is in the center of the page. Is there a way to define XY coordinates in the iFrame so it doesn't automatically choose the top left corner of the page?
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    You can supposedly use JavaScript to set it. You would use code like

    PHP:
    window.frames['anchor_iframe'].document.body.scrollTop anchorPos;
    to get it done. I've never tried it myself though.
     

Share This Page