SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question how to positioning the content inside IFRAME ?

    i think i'm posted into the wrong cateogry before,
    so i'll post this once again.
    if i need to remove the old thhread i made,
    any1 can tell me how..

    here is the details.

    hello,

    i'd like to display a portion of a webpage inside another webpage. says B inside A. Here is the issue,
    i'd to display a portion of B says (start at) 100px from top of page B inside A,
    i know how to display B in A using iframe,
    however i don't know how to ask the iFrame to display B wiht constraint such that it will display the B content with 100px margin-top.

    thanks for any suggestion or advice.

    Tom

  2. #2
    Function Curry'er JimmyP's Avatar
    Join Date
    Aug 2007
    Location
    Brighton, UK
    Posts
    2,006
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could either grab the bit of the page you want beforehand and put it in a seperate HTML file and then put that in the iframe....

    Or...
    THere might be a way of using some script to make the page margin-top -100px when a user is using the iframe....although i have no idea how to do that...

    Are u in control of the page which u want to go in the frame???
    James Padolsey
    末末末末末末末末末末末末末末末末末末末
    Awesome JavaScript Zoomer (demo here)
    'Ajaxy' - Ajax integration solution (demo here)

  3. #3
    Function Curry'er JimmyP's Avatar
    Join Date
    Aug 2007
    Location
    Brighton, UK
    Posts
    2,006
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Or u could put a div to cover the first 100px of the iframe...
    James Padolsey
    末末末末末末末末末末末末末末末末末末末
    Awesome JavaScript Zoomer (demo here)
    'Ajaxy' - Ajax integration solution (demo here)

  4. #4
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    umm.. i'm not sure if i followed u 100%,
    but i'd like to display the content of B inside A such that
    the content of B that will get displayed will be start 100px on top
    ( will be like someone scroll it down a little bit) [please tell me if i am confusing u]

  5. #5
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,107
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    In the src attribute you can add a #example at the end of the url - it should then jump down to the section in the page which has an id="example".

  6. #6
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i know that method , but i can't do that..
    it's like sometimes user will post a url to my web, and i'd just want to display a portion of that web inside one DIV.

    so, i think javascript might b able to help me out.
    but i no clue how to do it


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •