82 users online (0 members and 82 guests)  




  Results 1 to 10 of 10
Digg button stumble

Related

  1. Replies: 3
  2. Moving the Iframe Scrollbar    Forum: HTML Forum
    Replies: 1
  3. iFrame Scrollbar Issues    Forum: CSS Forum
    Replies: 11
  4. Replies: 5
  5. iFrame Scrollbar    Forum: HTML Forum
    Replies: 1
  1. #1
    ch1mpd4ddy's Avatar
    New User

    Status
    Offline
    Join Date
    Apr 2004
    Posts
    1

    Question Iframe Scrollbar

    Hi, I designed the site for an online radio station and I recently converted it to all iFrame content and one php index file that links to different iframes in the "datamain" iframe. In Mozzila, the iframe displays perfect, but in IE it shows a scrollbar that doesnt move because it is set to "scrollbar=yes" because one of the pages is longer than the iframe. However, all of the other pages fit and the useless scrollbar in IE just takes up space and makes it look bad. Is there a way to set it so the scroll bar is only displayed when the content is longer than the iframe? Here is the link to the site so you can see what I'm talking about:

    www.1019theedge.com

    One more question about "liquid" design. I'd like to set the main table so that my footer image is at the bottom of every screen's view no matter what. I have tried setting the table length to 100% but it never seems to work.

    Thanks!
    Chris G



  • #2
    Android's Avatar

    Status
    Offline
    Join Date
    Oct 2002
    Location
    I AM CANADIAN
    Posts
    440

    Smile scrollbar="yes"?

    I think it's scrolling="yes".
    scrolling="yes" will give you the outline of a potential scrollbar.
    The valid attributes are "yes", "no", and "auto".
    Try setting it to "auto". Then the scrollbar will only appear if the content overflows the frame.

  • #3
    izzideluxe2000's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2005
    Posts
    1

    Re: Iframe Scrollbar

    heyho.
    i have a problem like that. i have designed a website an put a iframe (scrolling is auto) in it. the content of the iframe is not as wide as the iframe, but a scrollbar appears. what is wrong (only in ie, in firefox it is allright)?

    <iframe
    name=contentFrame
    src="appl/index.htm" frameborder=0
    width=730 height=550 scrolling="auto"></iframe>


    thank you.

  • #4
    Candyman's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2005
    Posts
    2

    Exclamation Re: Iframe Scrollbar

    Maybe it happens like in a site Im designing now: I want vertical scrolling to be automatic, but horizontal to be always off.

    Try this in your CSS:


    html {
    overflow-x: hidden;
    }


    But keep the scrolling="auto" in your iframe, like they told you earlier. That way, horizontal scroll will be always off, while the vertical scrolling will be automatic.

    Thanks to this board I knew how to color iframe scrollbars, so I thought I could give something back

  • #5
    elee's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2005
    Posts
    1

    Re: Iframe Scrollbar

    IE'S MOMENTARY LAPSE OF REASON:

    The reason this occurs is because when you set the width of the iframe, the body of the included page inherits that width. So if the iframe has its width set to 400px, the body of the included page has its width set to 400px. This is not a problem unless the height of the page is greater than the height of the iframe. Then, the iframe takes up some of the width to use for the vertical scrollbar. So, the iframe has a width of 400px, but the width of the display box is only about 385px because the vertical scrollbar takes up about 15px. However, the body of the included page is still 400px - even if the included page's content only has a width of 1px. So, you end up with a horizontal scrollbar. Other browsers set the width of the body to the width of the viewable space. IE is retarded.


    THE WORKAROUNDS:

    There are three ways to get rid of the unnecessary horizontal scrollbar in IE (you only have to do one of the three):

    1) Set the body style of the page that appears within the iframe to:
    display: inline;
    (<body style="display: inline"> or use a style sheet or set the style in the header)
    The reason this works is because it forces the body with to be only as wide as its content.

    2) Set the doctype of the page that appears within the iframe to
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    (leave out the link to the dtd)

    3) in the iframe tag, set the attribute:
    scrolling="yes"
    (This will cause the vertical scrollbar to always be present, but the horizontal scrollbar will appear only when necessary. The reason this works is because in this situation, IE allots space for the vertical scrollbar before setting the width of the included body.)

  • #6
    Alabaster's Avatar
    New User

    Status
    Offline
    Join Date
    Nov 2005
    Location
    The Netherlands, Europe
    Posts
    1

    Re: Iframe Scrollbar

    elee, you've managed to solve my problems I've had for the last couple of months. I've read a lot of sites but nothing seemed to solve this problem. Thanks so much for this info.

  • #7
    martino's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2005
    Posts
    1

    Re: Iframe Scrollbar

    Thanks Candyman! You solved the same problem I had, not with iFrames but with a regular frame which (mis)behaved likewise.

  • #8
    Webfu's Avatar
    New User

    Status
    Offline
    Join Date
    Jun 2006
    Location
    Portland, Oregon
    Posts
    1

    Re: Iframe Scrollbar

    Thanks Elee, for taking the time to post the 3) in the iframe tag, set the attribute:
    scrolling="yes" --
    This totally fixed my problem.
    Greg Beddor -
    Last edited by HTML; 06-04-2006 at 01:51 PM. Reason: You may add your signature to profile when enough posts have been reached

  • #9
    hayo's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2008
    Posts
    1

    Re: Iframe Scrollbar

    Quote Originally Posted by elee View Post
    IE'S MOMENTARY LAPSE OF REASON:

    THE WORKAROUNDS:

    There are three ways to get rid of the unnecessary horizontal scrollbar in IE (you only have to do one of the three):
    [...]
    Your three ways did not apply for me [IE6]. But there is another solution derived from these:

    4) Set <body style="width:98%;"> which also will leave enough space on the right.

    Additionally <html style="overflow: auto;"> (in the html page containing the iframe) had to be set to avoid a disabled right scrollbar for XHTML 1.0 Transitional.

    To make clear what happens: what we use in the end are the scrollbars attached to the iframe element.

  • #10
    indiaboys's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2009
    Posts
    2

    Question Iframe target not working

    can anybody tell me why the target link not working in http://www.ijexportsinc.com/metal_menu.html


    the target frame is in http://www.ijexportsinc.com/index2.html

    i want to open the alum.html in FRAME1



  • Tags for this Thread

    Posting Permissions

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