1

I have aJQuery animation that expands a DIV and makes it go larger than the browser. When that happens a scroll bar appears and meks the page look as if it jumps. Anyone have any solutions for this?

http://www.kerrydean.ca/MATHESON/home5.html

Greg
  • 567
  • 2
  • 14
  • 31

5 Answers5

1
html {
  overflow: -moz-scrollbars-vertical; 
  overflow-y: scroll;
}

See: Making the main scrollbar always visible.

Community
  • 1
  • 1
Geert
  • 1,804
  • 15
  • 15
0

If you know you will need need the overflow then turn it on in CSS

body {
  overflow: scroll;
}
John Hartsock
  • 85,422
  • 23
  • 131
  • 146
0

I guessing that the page looks like it 'jumps' because the vertical scroll bar is dynamically added to the window when the content goes below the bottom of the browser.

You can make the vertical scroll bar always appear regardless whether or not there is content by setting the height of your HTML tag to 101%:

<html xmlns="http://www.w3.org/1999/xhtml" style="height: 101%;">
Adam Prax
  • 6,413
  • 3
  • 30
  • 31
0

If the page is never supposed to scroll, you can set overflow: hidden on the body tag. Also, you might set make the gutters on the left side constant width.

KingErroneous
  • 989
  • 1
  • 8
  • 16
  • 1
    im interested in this gutter thing. Do you mean I can set it so the playout already accommodates the size of scroll bar, so when i t appears, it wont jump? – Greg Apr 29 '11 at 16:18
0

You can do "overflow-y:hidden" on the body element and it will disable scrollbar

Stanislav Ageev
  • 778
  • 4
  • 10