Just one scroll in a Frame??

Discussion in 'HTML' started by Daniele, Jun 30, 2004.

  1. Daniele

    Daniele Guest

    How can I have only one scrollbar in a frame (they appear both
    simultaneously even if the content exceed only vertically and not
    horizontally)?
    Can I do it with javascript??
    Thanks for any advice.
    bye
     
    Daniele, Jun 30, 2004
    #1
    1. Advertising

  2. Daniele

    SpaceGirl Guest

    Daniele wrote:

    > How can I have only one scrollbar in a frame (they appear both
    > simultaneously even if the content exceed only vertically and not
    > horizontally)?
    > Can I do it with javascript??
    > Thanks for any advice.
    > bye
    >
    >


    Set scrolling to auto and that will only display the scrollbars that are
    required. Also, make sure your content is kept away from the edges of
    the frame. Best trick is to place your content inside an DIV which is 20
    pixels narrower than the frame in which it sits.

    You need to try it on a few browsers too, as the results vary. Also, if
    IE is rendering XHTML, you may find that in some pages you just cannot
    turn off the extra scrollbar - this is because IE has problems rendering
    XHTML. If you can avoid frames and use scrollable layers, IE handles
    this a little better when rendering XHTML.

    --


    x theSpaceGirl (miranda)

    # lead designer @ http://www.dhnewmedia.com #
    # remove NO SPAM to email, or use form on website #
     
    SpaceGirl, Jun 30, 2004
    #2
    1. Advertising

  3. Daniele

    Steve Pugh Guest

    SpaceGirl <> wrote:
    >Daniele wrote:
    >
    >> How can I have only one scrollbar in a frame (they appear both
    >> simultaneously even if the content exceed only vertically and not
    >> horizontally)?

    >
    >You need to try it on a few browsers too, as the results vary. Also, if
    >IE is rendering XHTML, you may find that in some pages you just cannot
    >turn off the extra scrollbar - this is because IE has problems rendering
    >XHTML.


    It's got bothing to do with XHTML. It's got everything to do with
    doctype sniffing. If your doctype (of the framed page, not the
    frameset) triggers Standards mode then IE will show both scrollbars,
    if it triggers Quirks mode then it will only show scrollbars as
    needed.

    Look at http://steve.pugh.net/test/test40.html
    The upper frame is XHTML but triggers Quirks mode, the lower frame is
    HTML but triggers Standards mode.

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
     
    Steve Pugh, Jun 30, 2004
    #3
  4. Daniele

    SpaceGirl Guest

    Steve Pugh wrote:

    > SpaceGirl <> wrote:
    >
    >>Daniele wrote:
    >>
    >>
    >>>How can I have only one scrollbar in a frame (they appear both
    >>>simultaneously even if the content exceed only vertically and not
    >>>horizontally)?

    >>
    >>You need to try it on a few browsers too, as the results vary. Also, if
    >>IE is rendering XHTML, you may find that in some pages you just cannot
    >>turn off the extra scrollbar - this is because IE has problems rendering
    >>XHTML.

    >
    >
    > It's got bothing to do with XHTML. It's got everything to do with
    > doctype sniffing. If your doctype (of the framed page, not the
    > frameset) triggers Standards mode then IE will show both scrollbars,
    > if it triggers Quirks mode then it will only show scrollbars as
    > needed.
    >
    > Look at http://steve.pugh.net/test/test40.html
    > The upper frame is XHTML but triggers Quirks mode, the lower frame is
    > HTML but triggers Standards mode.
    >
    > Steve
    >


    So it has got to do with XHTML... sort of? :)

    ...or at least, whichever mode IE chooses to use to render the page.
    Standards mode IE (XHTML content) = scrollbars. Same in Mozilla or
    Firefox = no scrollbar. IE hates the application/xhtml+xml doctype, yes?

    I hate IE :(


    --


    x theSpaceGirl (miranda)

    # lead designer @ http://www.dhnewmedia.com #
    # remove NO SPAM to email, or use form on website #
     
    SpaceGirl, Jun 30, 2004
    #4
  5. Daniele

    Steve Pugh Guest

    SpaceGirl <> wrote:
    >Steve Pugh wrote:
    >> SpaceGirl <> wrote:
    >>>Daniele wrote:
    >>>
    >>>>How can I have only one scrollbar in a frame (they appear both
    >>>>simultaneously even if the content exceed only vertically and not
    >>>>horizontally)?
    >>>
    >>>You need to try it on a few browsers too, as the results vary. Also, if
    >>>IE is rendering XHTML, you may find that in some pages you just cannot
    >>>turn off the extra scrollbar - this is because IE has problems rendering
    >>>XHTML.

    >>
    >> It's got nothing to do with XHTML. It's got everything to do with
    >> doctype sniffing. If your doctype (of the framed page, not the
    >> frameset) triggers Standards mode then IE will show both scrollbars,
    >> if it triggers Quirks mode then it will only show scrollbars as
    >> needed.
    >>
    >> Look at http://steve.pugh.net/test/test40.html
    >> The upper frame is XHTML but triggers Quirks mode, the lower frame is
    >> HTML but triggers Standards mode.

    >
    >So it has got to do with XHTML... sort of? :)


    No.
    My example could equally have used two XHTML pages or two HTML pages,
    or HTML in quirks mode and XHTML in standards mode.

    >..or at least, whichever mode IE chooses to use to render the page.
    >Standards mode IE (XHTML content) = scrollbars.


    Standards mode = scrollbars.
    Whether the document that triggers standards mode is HTML or XHTML is
    totally, 100%, irrelevant.

    IE doesn't care. IE doesn't even know what HTML and XHTML are. All it
    sees is a mess of tags and it looks at the first line of the document
    to determine whether it's going to use standards or quirks mode to
    render the document.

    >Same in Mozilla or Firefox = no scrollbar.


    Neither frame in this specific test showed a horizontal scrollbar in
    anything other than IE. But there are other conditions that can
    trigger unexpected horizontal scrollbars.

    >IE hates the application/xhtml+xml doctype, yes?


    IE simply doesn't know what it is and so offers the user to download
    the file, just like any other unknown data format.

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
     
    Steve Pugh, Jun 30, 2004
    #5
  6. Daniele

    Mark Parnell Guest

    On Wed, 30 Jun 2004 11:40:12 +0100, SpaceGirl
    <> declared in alt.html:

    > IE hates the application/xhtml+xml doctype, yes?


    application/xhtml+xml is not a doctype, it's a mime type. Very
    different. And yes - IE doesn't understand it, so it won't actually
    display the page, just ask you to download the file.

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    "Never drink rum&coke whilst reading usenet" - rf 2004
     
    Mark Parnell, Jul 1, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Søren M. Olesen
    Replies:
    0
    Views:
    614
    Søren M. Olesen
    Nov 13, 2003
  2. Noozer
    Replies:
    0
    Views:
    3,028
    Noozer
    Oct 22, 2005
  3. ABC
    Replies:
    0
    Views:
    613
  4. Fokke Nauta
    Replies:
    3
    Views:
    992
    Fokke Nauta
    Apr 29, 2009
  5. Kathryn
    Replies:
    4
    Views:
    390
Loading...

Share This Page