Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Iframe's scrollbars problem (FireFox)

  1. #1
    Join Date
    Jun 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Iframe's scrollbars problem (FireFox)


    Okay, I'm trying to make a website friendly with both IE and FF, and it uses frames. I have no problem seeing it on IE, everything's working like it should be. But when I see it on FireFox, an ugly, evil horizontal scrollball appears

    I've tried doing the normal "fixing" codes like scrolling="auto" scrolling="yes" and nothing would work. I also tried changing the width of the content.. but nothing would work to remove the horizontal scrollbar.. I didn't have the problem using IE.

    The code I'm using for the iframe right now is
    Code:
    <iframe name="draw" src="main.htm" scrolling="yes" FRAMEBORDER="0" width="328" height="248" marginwidth="0" marginheight="0" allowtransparency="true">
    </iframe>
    Or maybe is that I have to change the content of the iframe?.. Or it's not a coding problem? If anyone can help, I'd be thankful.


  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Post

    Use the CSS:

    Code:
    iframe {
    overflow-x: hidden;
    overflow-y: scroll;
    }
    Thanks to cr3 for suggesting it was a CSS attribute

    Be aware that this means that if anything does extend beyond the width of the frame, it won't be accessible to the user.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by twey
    iframe {
    overflow-x: hidden;
    overflow-y: scroll;
    }
    Those are IE specific codes. To get rid of the horizontal scrollbar in FF you need to set the iframe's scrolling="auto" (preferred) or scrolling="yes" and the content page has to be able to display within the iframe's width. This can be done by having no content wider than the iframe's width. This gets a bit tricky with text content, as any line that won't wrap to the desired width will cause a horizontal scrollbar. Especially when you consider that FF will generally only wrap lines on white space.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    He already said he tried all that.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    It works though, the OP probably still had content too wide for the iframe without realizing it. Your method will change nothing in FF. What we really need is a link to the problem page.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Jun 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ok I just fixed it It wasn't nothing to do with that, it was because header's with was "100%" And it needed to be less, i changed it to 90 and everything's Okay.

    thank you all for trying to help!

    He already said he tried all that.
    (by the way, I'm a girl)

  7. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Ack, sorry. (smacks self)
    Usually try to use "s/he," but you don't say it out loud, and sometimes I forget.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    You've both conveniently skipped over the fact that I got this one right, the content was too wide after all.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. #9
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    OK, OK, you were right.
    The reason I didn't suggest it was that she said she had already adjusted the content width, to no avail.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  10. #10
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Cool

    Thanks Twey, I probably shouldn't have mentioned it.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •