Scrolling to anchor tags within scrollable divs

This morning I’ve been hunting around for a solution to a client’s problem – getting internal links to work within a scrollable div. It was more difficult than I thought it might be.

The problem was that when you click on a link to an anchor tag within the same page, the entire page wants to scroll up so that the anchor tag is near the top of the browser window. Because my client’s design is a pretty small content area in the middle of the screen, that didn’t work well. I needed to find a solution that would only affect the content within a single scrollable div.

I looked at a number of jQuery options that didn’t really pan out. About 10 minutes ago I found a little free script called SoftDivScroll. It was extremely easy to install and configure, and it works beautifully in FF, Chrome, Safari/Win, Opera, and IE 8/7/6.

I just sent the author a little donation for this timesaving script.


Leave a Reply

Your email address will not be published. Required fields are marked *