Unstoppable Domains

Horizontal anchor scrolling

Spaceship Spaceship
Watch

NORRITT

New Member
Impact
0
Hello,

I want to let my website scroll horizontal, if someone clicks an anchor. But unfortunatly the "classic" anchor-scrolldown funktion does only work in the vertical way (like you can see on every wiki-page for example). But I could not find any way to let it scroll horizontal.

Do you have any ideas or solutions to do so?

thanks!
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
First you need to create a layout that stretches out horizontally. Just make sure you know where the elements are placed (exact coordinates), and then you can scroll anywhere with JavaScript.
 
0
•••
hi mch!
yes, my layout is css based and extends about 3000px horizontally.

can you tell me where such a javascript could be found? Unfortunatly I have no such skills right now.
 
0
•••
Code:
<a href="javascript:scroll(100,0)">Scroll right 100px</a>
The 100 is the horizontal offset. I don't know if it's always from the very left or from the current position. The 0 is the vertical point.
 
0
•••
"In JavaScript 1.2, scroll is no longer used and has been replaced by scrollTo."

You have two methods you can use:

window.scrollBy(horizontal, vertical)
Scrolls the viewing area of a window by the specified amount.

window.scrollTo(x-coordinate, y-coordinate)
Scrolls the viewing area of a window so that the specified point becomes the top-left corner.
 
0
•••
thank you for the replys! I will try that.

have a great day.
 
0
•••
Appraise.net

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Zero Commission
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back