Stop iFrame Scrolling.

Discussion in 'HTML & Website Design' started by Plutonic, Nov 25, 2009.

  1. #1
    Hey, I've got an iFrame on my page, I've stopped it from scrolling with the "scrolling=no" function. But it still scrolls when you click in the iFrame and drag the mouse up and down.

    I was wondering if it's possible to lock the iFrame (or the anchor that's in the page in the iFrame) from moving. I don't want it to be possible to move the page inside the iFrame.

    Although you can't scroll with the scrollbar or mouse wheel, you can still drag it.

    How can I fix this? Or is there a better method than iFrames?
     
    Plutonic, Nov 25, 2009 IP
  2. vinpkl

    vinpkl Active Member

    Messages:
    899
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    58
    #2
    if the content height is higher than iframe height then the scroll will come.

    try to increase iframe height say 5px more than from content height.

    if this doesnt helps then post your code or link to see.

    vineet
     
    vinpkl, Nov 25, 2009 IP
  3. jmpf

    jmpf Peon

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    or you could just make the content height to a pre-set value

    do you have control over the content or is it coming from a website not under you control?
    in this case it might be wise to just scrape the content and re-display it

    if you do have control this is simply a matter of using the correct css

    post some code if you still need help
     
    jmpf, Nov 25, 2009 IP
  4. rochow

    rochow Notable Member

    Messages:
    3,991
    Likes Received:
    245
    Best Answers:
    0
    Trophy Points:
    240
    #4
    Hell yes. Are you using an iframe for content that's on another site or for something that's on yours?
     
    rochow, Nov 26, 2009 IP
  5. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #5
    If it's scrolling, you've got more content in there than you've made room for.

    Either make the iframe bigger, or put less content in there.

    Otherwise, what's the point? Are you trying to make your visitors pull their hair out because they cannot access content?

    It's like letting people walk into a library but gluing all the books shut : (
     
    Stomme poes, Nov 27, 2009 IP
  6. Plutonic

    Plutonic Peon

    Messages:
    2,964
    Likes Received:
    85
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Haha, because on one page of my site I have a form, and I can't have that on any other page, so I need to display it through an iFrame. However on the form page I also have a header, sidebar etc. If I remove all of that it messes up (it's on WordPress) so in the iFrame I just want to display the form and not the header, links, sidebar etc. I worked out a way to do it though :D
     
    Plutonic, Nov 27, 2009 IP
  7. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #7
    That makes no sense at all. Can you explain more?

    Frames and iFrames are for basically having a page in a page. It would make sense if you had a form from some OTHER websites' page on your site to use an iFrame, because an iFrame has its own URL and everything.
     
    Stomme poes, Nov 29, 2009 IP
  8. hatterd

    hatterd Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    maybe if you post the code.. i might be able to help you out... if not then ill post the code im using..
     
    hatterd, Nov 29, 2009 IP
  9. boymc

    boymc Well-Known Member

    Messages:
    133
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    113
    #9
    <iframe src="http://mariecurie.biz/Marie-Curie-de-Saigon/" marginwidth="0" marginheight="0" hspace="0" vspace="0" width="1000" frameborder="0" height="550" scrolling="auto"></iframe>
    Code (markup):
    scrolling="auto"
    I think you need it.
     
    boymc, Nov 29, 2009 IP