Forum Moderators: open
Cheers, Limbo
>> edited for typos (title should say right scroller!)
To force a scrollbar, you need to use absolute positioning to place a div just below the bottom of the viewing area. So we do this:
CSS:
#scroll {
position:absolute;
top:0;
bottom:-0.1px;
width:1em;
z-index:-1;
} And (X)HTML:
<div id="scroll"></div> Let's not mention semantics, shall we! ;)
limbo, if you are happy that the entire page has a scrollbar, which I think you were saying in your post, why not just try:
html {
overflow: scroll;
}
This should force the browser to always display a scrollbar... One problem with this is that you will get a scrollbar area (faded) horizontally along the bottom too which may not look very good.
To combat this you could use overflow-y instead but you won't get much cross browser support for this one.
HTH
[edited by: BlobFisk at 9:59 am (utc) on Feb. 24, 2005]
/** added -- cor Blob you posted within a second of me replying to Encyclo! I think that might be a more elegant method too **/