newbie: vertical scrollbar on DIV

J

Jeff

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
 
S

Spartanicus

Jeff said:
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.
 
J

Jeff

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
 
S

Spartanicus

Please do not top post, corrected this once.

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.
 
N

Neredbojias

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top