...

View Full Version : Scroll up by specified number of pixels



inchecksolution
07-27-2011, 04:50 PM
Hi guys,

My site has links in it with hash tags so people can share information externally, and when the link is clicked on my page loads already scrolled down on the correct div. ex. http://www.mysite.com/#div123

My issue is the top of the div is aligned exactly on the top of the text in div123. Since the browser automatically scrolls there, is there a way to make the page scroll up by 20 pixels just to make it look nicer?

Thanks!!

mrhoo
07-27-2011, 07:04 PM
scrollBy(0,-20)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum