Saturday 13 March 2021

How to Add a Scroll Back To Top Button in Blogger Template?

Welcome back to ereviewmaster.com, Today in this article You will learn How to Add Smooth Scrolling Back To Top Button on your website/on your Blogger Template. A stylish Scroll To Top Button in any website is an awesome Jquery style that makes your website or Blogger template easy to navigate for your visitors.

How to Add a Scroll Back To Top Button in Blogger Template?
How to Add a Scroll Back To Top Button in Blogger Template?


If you post long 2000 words blogpost on your website or in a blogger post then it becomes tough for the readers to navigate through your blog, so adding a smooth Back To Top Button in Blogger will make your website or blogger post easy for accessing the blogpost.

To make your blogger website look more attractive and professional, add a Scroll Back To Top Button in your Blogger Template. If your blog looks attractive then your reader will find it more interesting to follow your blog.


Log in
to your blogger account and from the menu on the left tap on the Theme button

How to Add a Scroll Back To Top Button in Blogger Template?
How to Add a Scroll Back To Top Button in Blogger Template?

Tap on Customize Button to find other options
How to Add a Scroll Back To Top Button in Blogger Template?
How to Add a Scroll Back To Top Button in Blogger Template?

Tap on the Edit HTML button to the given below code.
How to Add a Scroll Back To Top Button in Blogger Template?
How to Add a Scroll Back To Top Button in Blogger Template?

Search </head> and </body> div using Ctrl+F buttons.
How to Add a Scroll Back To Top Button in Blogger Template?
How to Add a Scroll Back To Top Button in Blogger Template?

Steps to be followed are:

1. Log In to your Blogger 
2. Go to Theme Option.
3. Click Customize Button.
4. Click the Edit HTML dropdown button.
5. Add the below-given code by searching </head>, </body> using Ctrl+F.


You can add Scroll Back To Top Button in Blogger very easily. To learn How to Create a Scroll Back To Top Button in Blogger Template follow the Steps below.


Step 1. Add this Code before </head>


<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha512-SfTiTlX6kk+qitfevl/7LibUOeJWlt9rbyDn92a1DqWOw9vWG2MFoays0sgObmWazO5BQPiFucnnEAjpAB+/Sw==" crossorigin="anonymous" />

<style> html{ scroll-behavior: smooth; } #myBtn{ display: none; position: fixed; bottom: 20px; right: 30px; z-index: 99; border: none; outline: none; background-color: grey; color: black; cursor: pointer; padding: 15px; border-radius: 10px; font-size: 18px; } #myBtn:hover{ color: white; background: blue; } </style>

Step 2. Add this Code before </footer>

<i class="fa fa-arrow-up" id="myBtn" onclick="topFunction()"></i>

Step 3. Add this Code before </body>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>

<script> mybutton = document.getElementById("myBtn");

window.onscroll = function() {scrollFunction()};

function scrollFunction() {

if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { mybutton.style.display = "block"; }

else { mybutton.style.display = "none";}}

function topFunction() { document.body.scrollTop = 0; document.documentElement.scrollTop = 0;}</script>


That's all you need to do to add a Scroll Back To Top Button in a Blogger Template. If you wish you can change the colour of the Button from the style section inside the head div.


Check out our other blogs:


Thank You So Much, if you find 'How to Add a Scroll Back To Top Button in Blogger Template?' helpful comment Y if it works else comment N. Also, comment down below if you need any particular or if you are facing any issues in creating an attractive blog.