Cross
Solodev
800 N. Magnolia Ave. Suite 1400
Orlando, Florida 32803
info@solodev.com
407-898-1961
back arrow

Add a Scroll-to-Top Button to your Website

Adding a scroll-to-top button to your website adds further ease of navigation to your website...

Add a Scroll-to-Top Button to your Website

Add a Scroll to Top Button

Adding a sticky scroll-to-top button to your website adds further ease of navigation to your website by allowing a user to scroll to the top of any given web page with the click of a button. 

Below is the HTML, CSS, and JavaScript required to add this functionality to your website.

Step 1 - Add the HTML below to your web page

Step 2 - Add the CSS below to the main stylesheet of your website

Step 3 - Add the code below to a file called scroll.js

Step 4 - Add the includes below to the pages where your button lives

Build Amazing Websites with Solodev
With the Solodev Website Builder, it's faster and easier to design, build, and launch beautifully crafted websites than ever before.
Learn More