views:

11

answers:

2

I have a page that scrolls through images, some taller than the others. When a tall image loads it auto-creates a scrollbar in the browser window, causing a width jerk. Is there a way to load a scroll bar regardless of if it is needed, and when a tall image apears it activates itself accordingly, then deactivates its self accordingly when the image changes to a shorter image?

Thank you!

A: 

Make a container div for the images, then make its height:110%; or any height > 100%.

Babiker
+1  A: 
div {
  overflow: scroll;
}

ought to do it. That will put up scrollbars whether or not they are called for. You can get fancier by doing

div {
  overflow-x: scroll;
}

if you just want horizontal scrollbars or

div {
  overflow-y: scroll;
}

if you just want vertical scrollbars. From your question it sounds like you are interested in the latter solution.

Robusto
gracious, This happened to work over the div css:body { overflow: scroll;}
atwellpub