Creative Jar Blog RSS Feed

Scrolling div and anchor links

March 18, 2008 12:32 by rob

I've just hit a browser difference that stopped me for a while!

My problem:

Text links outside a scolling div to jump the scroll view to the desired location within the scrolling div.
The scrolling div has the css overflow:auto; with a set height to enable scrolling.
Using normal anchor links and names worked for firefox but not IE6 + IE7, after researching on the net I came across a javascript equivalent.

document.getElementById('elmID').scrollIntoView(true);

Using this javascript and adding ID's to the areas I needed for scroll view worked a treat! 


Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Related posts

Add comment


 

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

January 6. 2009 08:38

Calendar

January 2009
SuMoTuWeThFrSa
28293031123
45678910
11121314151617
18192021222324
25262728293031
1234567