newbie: vertical scrollbar on DIV

Discussion in 'HTML' started by Jeff, Nov 26, 2005.

  1. Jeff

    Jeff Guest

    Hey

    I'm trying to use a DIV in my xhtml code so that if the content placed
    within the DIV is larger than the DIV, then a vertical scrollbar is added to
    the DIV => no horizontal scrollbar added....

    I've tryed this CSS configuration but it doesn't define that it's vertical
    scrollbar
    DIV#content {
    overflow:scroll;
    }

    If this is possible, how do I set up only vertical scrollbar on a DIV?


    Jeff
    Jeff, Nov 26, 2005
    #1
    1. Advertising

  2. Jeff

    Spartanicus Guest

    "Jeff" <> wrote:

    >I'm trying to use a DIV in my xhtml code so that if the content placed
    >within the DIV is larger than the DIV, then a vertical scrollbar is added to
    >the DIV


    "Scrolling divs" are a usability nightmare, scrolling them using the
    mouse wheel is poorly supported, for keyboard users scrolling is nigh
    impossible.

    --
    Spartanicus
    Spartanicus, Nov 26, 2005
    #2
    1. Advertising

  3. Jeff

    Jeff Guest

    I see...

    What if I use Iframe instead of DIV, is it then possible to only have
    vertical scrollbar on iframe?

    If it is possible, how do I set up the iframe to only have vertical
    scrollbar (no horizontal scrollbar)?

    Jeff



    "Spartanicus" <> wrote in message
    news:...
    > "Jeff" <> wrote:
    >
    >>I'm trying to use a DIV in my xhtml code so that if the content placed
    >>within the DIV is larger than the DIV, then a vertical scrollbar is added
    >>to
    >>the DIV

    >
    > "Scrolling divs" are a usability nightmare, scrolling them using the
    > mouse wheel is poorly supported, for keyboard users scrolling is nigh
    > impossible.
    >
    > --
    > Spartanicus
    Jeff, Nov 26, 2005
    #3
  4. Jeff

    Spartanicus Guest

    Please do not top post, corrected this once.

    "Jeff" <> wrote:

    >>>I'm trying to use a DIV in my xhtml code so that if the content placed
    >>>within the DIV is larger than the DIV, then a vertical scrollbar is added
    >>>to
    >>>the DIV

    >>
    >> "Scrolling divs" are a usability nightmare, scrolling them using the
    >> mouse wheel is poorly supported, for keyboard users scrolling is nigh
    >> impossible.


    >I see...
    >
    >What if I use Iframe instead of DIV, is it then possible to only have
    >vertical scrollbar on iframe?


    What I wrote didn't relate to "only have vertical scrollbar", it related
    to a fundamental usability problem of scroll bars on a div element.

    >If it is possible, how do I set up the iframe to only have vertical
    >scrollbar (no horizontal scrollbar)?


    Opening a new viewport within the principle viewport causes usability
    problems whatever method you choose. If you have an amount of content
    that you deem to be to large to show in it's entirety on a given page,
    don't create a new viewport, place a teaser with a "... More" link after
    it that links to another page with the full content on it.

    --
    Spartanicus
    Spartanicus, Nov 26, 2005
    #4
  5. Jeff

    Neredbojias Guest

    With neither quill nor qualm, Jeff quothed:

    > Hey
    >
    > I'm trying to use a DIV in my xhtml code so that if the content placed
    > within the DIV is larger than the DIV, then a vertical scrollbar is added to
    > the DIV => no horizontal scrollbar added....


    Basically impossible. Some very convoluted use of css, nested divs, and
    the overflow property could probably be contrived which would sort of do
    it, but the result would be awkward and undependable.

    --
    Neredbojias
    Contrary to popular belief, it is believable.
    Neredbojias, Nov 27, 2005
    #5
    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. r pasadhy via .NET 247

    positioning vertical scrollbar

    r pasadhy via .NET 247, Aug 11, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    3,132
    Joe Fallon
    Aug 12, 2004
  2. Olav Tollefsen
    Replies:
    1
    Views:
    40,691
    Ken Cox [Microsoft MVP]
    Jan 29, 2005
  3. SJ
    Replies:
    1
    Views:
    1,622
    Kevin Spencer
    Jan 11, 2006
  4. Don Schneider
    Replies:
    0
    Views:
    2,006
    Don Schneider
    Jun 27, 2003
  5. Sean
    Replies:
    2
    Views:
    436
    Toby A Inkster
    Aug 7, 2003
Loading...

Share This Page