Creating a Sticky Navigation Menu When Scrolling on Blogger

Creating Sticky Navigation menu
The sticky menu is also known as the Fixed Menu as it allows a website visitor to make hassle-free navigation along the Blogger menu. A fixed menu remains appeared at the top of blogger even when we scroll down. On the other hand, a Sticky/Fixed navigation bar remains at its fixed position when we play with our mouse scroll bar. Sticky navigation bar lets our website visitors keep an eye on our BlogSpot menu continuously as it doesn't get disturbed by scrolling down. You might have seen on many Blogs and Websites, whenever you scroll down the website menu gets disappeared thus we use Back to Top button (If available) in order to make it appear again. If the website doesn't have Back to the Top option we keep scrolling back to get access to the navigation menu. There are many professional bloggers who know the truth behind the fixed navigation menus. It makes a website visitor stay on our Website for a long time.

Recommended: Strip Slideshow Widget Recommended for Blogger Sites

Creating Fixed Navigation Menu in BlogSpot

  • Go to your Blogger Dashboard > Theme > Edit HTML
  • Click anywhere inside the template editor
  • Press C + F to open the Search box
  • Type ]]></b:skin> in the search box and press Enter Key
  • Paste the given code just above the ]]></b:skin>
.sticky{position:fixed!important;top:0;z-index:99;-webkit-transform:translateZ(0);}
  • Now again repeat the step 4 but here you've to type the </body> instead of ]]></b:skin>
  • After you find the </body> paste the given code just above the it
<script type='text/javascript'>
//<![CDATA[
// Sticky Menubar
function makemeSticky(e){function t(){var e=s.getBoundingClientRect();e.top<0?(n.className=a+" sticky",n.style.width=i+"px"):n.className=a}var n=document.getElementById(e),s=document.createElement("div");n.parentNode.insertBefore(s,n);var i=n.offsetWidth,a=n.className+" makesticky";window.addEventListener("scroll",t,!1)}makemeSticky("menu-wrapper");
//]]>
</script>
Before you hit the Save button, replace the blue text with your Navigation Menu ID. Your Navigation menu ID can be found by clicking the Right-Click on your Navigation menu or find it directly from the template editor.
Having trouble with this tutorial? Post your valuable comments and let us help you for free.
Subcribe to Our Newsletter For Free

Subscribe Now

Recommended For You

Speak Your Mind