Reputation: 37137
Is there any way to set the scroll position to a default value?
I know how to do it in javascript, for example with jquery:
$("div#divWithScroll").attr("scrollTop",200);
But I wanted to do it with css only, I have no idea if it is possible.
Upvotes: 21
Views: 51573
Reputation: 1035
Within boundaries, it is possible:
When you go to the url www.domain.com/#divWithScroll
then you will scroll down by default.
<a href="#divWithScroll">Scroll down</a><!-- clicking this works either -->
<!-- long blablabla -->
<div id="divWithScroll">Scrolled here</div>
More on http://css-tricks.com/hash-tag-links-padding/
Upvotes: 19
Reputation: 4555
It's not really a "style" issue, so it's not something that CSS would cover.
Upvotes: 10