View Full Version : Div scrolls
shaoblivion
11-11-2007, 02:25 AM
While changing my site to include divs I've realized that the scrolling on my page has become "rough" the divs distort while scrolling and it is hard to scroll to an exact position. How can I make the scrolling smoother? Thanks.
P.S. Wasn't really sure what kind of code it would need if there's one for this so I just kind of guessed.
Usually this happens when there's video-rich content in your page. Big or animated images, embedded content (Flash, Java, Silverlight), or, in some browsers, position: fixed; elements, can all have this effect.
shaoblivion
11-11-2007, 05:53 AM
Hmm. I only have a couple of images but a lot of things are positioned "absolutely" and my background is fixed.
It would probably be the background.
jscheuer1
11-11-2007, 06:16 AM
Generally, these sort of things are both browser/machine and layout/style centric. This means that if you lay things out and style them in a particular way, a particular browser on a particular machine might exhibit rough scrolling or some other undesirable thing.
KISS (keep it simple, stupid) is a good rule of thumb, especially for the inexperienced coder. Avoid absolute positioning, relative positioning, and floats as much as possible. Use margins and padding to tweak position.
And remember, no efficient design will look identical in all browsers on all systems. But an efficient design will look OK, and be accessible for almost all user agents.
A page can be very dramatic in appearance without using tons of tricks. Just one or two well utilized effects can make a very powerful presentation. If these effects degrade well in non-supporting agents and are skipped in agents that they would make a mess in, so much the better.
shaoblivion
11-11-2007, 08:55 PM
I tried looking at it in both the new IE and FireFox, though I use FireFox as default and it was even slower in IE. Thanks for the help guys I'll try to position everything with cellpadding and see if that helps any.
jscheuer1
11-11-2007, 08:58 PM
I meant style padding and style margins.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.