Make A Sticky Widget ,Ads , Navigation On Blogger

08:16

STEP 1

1. Go Blogger >Click  Template > Edit HTML > Copy the code below and apply just before </body>

As an example to be made of sticky widget is a widget with ID # HTML1

<script type='text/javascript'>
//<![CDATA[
// Sticky Widget
function makemeSticky(e){function t(){var e=s.getBoundingClientRect();e.top<0?(n.className=a+" makesticking",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("HTML1");
//]]>
</script>

Decide on the widget ID codes marked.

Read also: Some Functions Tag Conditional At Widget

2. Then save the code below before]]></b:skin> atau </style>

.makesticking{background:none!important;position:fixed!important;top:25px;z-index:99;-webkit-transform:translateZ(0);}
#HTML1 .widget-content {padding:0;margin:auto;}

Share this

Related Posts

Previous
Next Post »