How To Add Floating ‘Subscribe’ Bar to Blogger

Posted by Lasantha Bandara on May 28th, 2009 File Under : background, change template, html2 Comments

1.Login to your blogger dashboard--> layout- -> Edit HTML

2.Scroll down to where you see </head> tag .

3.Copy below code and paste it just before the </head> tag .

<style type="text/css">
#mta_bar {
border-top: 3px solid #6699ff;
margin: 0;
padding: 7px 0;
z-index: 100;
width: 100%;
overflow: auto;
position: fixed;
* html #mta_bar{
/*IE6 hack*/
position: absolute;
width: expression(document.compatMode=="CSS1Compat"? document.documentElement.clientWidth+"px" : body.clientWidth+"px");
#mta_bar .left { float: left; text-align: center; font-family: Arial; font-size: 13px; font-weight: bold; font-style: normal; color: #0000FF; width:92%;}
#mta_bar .right {font-family: Arial, Helvetica, sans-serif; float: right; text-align: center; font-weight: normal; font-size: 10px;letter-spacing: 0; width: 30px; white-space: nowrap;}
#mta_bar .right a {font-size: 10px; color: #0000FF; text-decoration: underline;}
#mta_bar .right a:hover {font-size: 10px; color: #0000FF; text-decoration: none;}
#left_bar a {background: url('') no-repeat; text-decoration: none; color: #fff; padding:5px 0px 5px 30px;}
#left_bar a:hover { text-decoration: underline; color: #fff; }

<script type='text/javascript'>
var mta_arr = new Array();
var mta_clear = new Array();
function mtaFloat(mta) {
mta_arr[mta_arr.length] = this;
var mtapointer = eval(mta_arr.length-1);
this.pagetop = 0;
this.cmode = (document.compatMode && document.compatMode!="BackCompat") ? document.documentElement : document.body;
this.mtasrc = document.all? document.all[mta] : document.getElementById(mta);
this.mtasrc.height = this.mtasrc.offsetHeight;
this.mtaheight = this.cmode.clientHeight;
this.mtaoffset = mtaGetOffsetY(mta_arr[mtapointer]);
var mtabar = 'mta_clear['+mtapointer+'] = setInterval("mtaFloatInit(mta_arr['+mtapointer+'])",1);';
mtabar = mtabar;
function mtaGetOffsetY(mta) {
var mtaTotOffset = parseInt(mta.mtasrc.offsetTop);
var parentOffset = mta.mtasrc.offsetParent;
while ( parentOffset != null ) {
mtaTotOffset += parentOffset.offsetTop;
parentOffset = parentOffset.offsetParent;
return mtaTotOffset;
function mtaFloatInit(mta) {
mta.pagetop = mta.cmode.scrollTop; = mta.pagetop - mta.mtaoffset + "px";
function closeTopAds() {
document.getElementById("mta_bar").style.visibility = "hidden";


4.Now again scroll down to where you see </body> tag.

5.Add below code before </body> tag.

<div id='mta_bar'>
<div id='left_bar'><span class='left'><a href='YOUR-FEED-BURNER-ADDRESS' target='_blank'>To Get Latest Update Subscribe Now !!!</a></span></div>
<span class='right' onmouseout='self.status=&apos;&apos;' onmouseover='self.status=&apos;;;return true;'> <img align='absmiddle' border='0' onClick='closeTopAds();return false;' src='' style='cursor:hand;cursor:pointer;'/></span></div>

NOTE : Remember to Replace YOUR-FEED-BURNER-ADDRESS and YOURBLOGNAME with your real details.Look at the example below.

6.Now save your template and you are done.

File Under : background, change template, html

2 Responses to “How To Add Floating ‘Subscribe’ Bar to Blogger”

  1. Iseiseje says:

    thanks, nice info ^^

  2. Lani says:

    This is great but the close button on the bar doesn't work for me! I tried it before and after changing fonts and colours on the widget and it doesn't work at all!

    Everything else works perfectly and is exactly how I wanted it though - thanks!

    Hoping you could help with the close button issue!

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.