In Blogger Make Your Old Site Navigation Bar Scrollable & Sticky


2012 is the twelvemonth of Information technology all pop websites similar Google,Facebook are making in that location site expect to a greater extent than demanding amongst latest engineering scientific discipline this is the argue why Google completely changed  looks of in that location products i.e YouTube , Blogger in addition to fifty-fifty renamed Android Market to Google Play Store.Google non exclusively changed the looks of in that location erstwhile products but besides introduced Google Plus which give-up the ghost the truthful competition of Facebook.Even Facebook endeavour to brand approximately changes which was non as successful as Google but withal they were pretty much extra ordinary.Facebook introduced timeline which has a nearly of import characteristic in addition to it is Scrollable Navigation bar

  • which allows yous to navigate the page amongst out going to transcend of the page.
  • when yous scroll downwards the page it volition give-up the ghost on next yous till real end.
  • which volition only appear when yous scroll downwards the page.
  • if yous scroll dorsum to transcend it volition instruct dorsum to its original position.
These are the characteristic which produce attract us although Google Dynamics has Scrollable sticky bar but it was not available for Blogger Custom Template 

After the research work of iii days and today’s 5 hours of coding Finally I was able To Create MBL Scrollable Sticky Navigation Bar For Blogger.It basically plant on jQuery when always yous scroll downwards it converts your electrical flow navigation bar into a scrolling bar in addition to when yous give-up the ghost dorsum to transcend it comes dorsum to its original position.So allow us starting optimizing our weblog for Scrollable Sticky Navigation Bar.it volition just Transform your Old navigation Bar into a Scrollable Navigation Bar.


I know yous would dear to preview The MBL Scrollable Sticky Navigation Bar take a expect at it.Remember:Your navigation bar remains the same but it volition become Scrollable and sticky






Important:To Get the Preview Please Scroll the DEMO pages in addition to yous volition move able to run into the Scrollable Sticky Navigation Bar. 

Adding CSS Style In Template


First nosotros volition add together styles canvas to the blogger template i.e CSS thence start give-up the ghost to

  • Blogger.com >> YourBlog >> Template >> EDIT HTML >> Proceed 
  • Search For ]]></b:skin> and exactly higher upward it glue the next code in addition to salve the template

/* MBL-Sticky-Navigation-Bar */
body, h1, h2, h3, p {
margin: 0; 
padding: 0;
}


::selection {
background: #c00;
color:#fff;
}


::-moz-selection {
background: #c00;
color:#fff;
}


/* full general styles */
body {
background: url(img/bgnoise_lg.png);
font: 20px ‘Open Sans Condensed’, Tahoma, Geneva, sans-serif;
         


}


a {
color:#c00;
text-decoration:none;
}


#MBL-Sticky-Navigation-Bar {
width:940px;
margin: 0 auto;


}


header {
text-align:center;
padding:70px 0;
}


header h1 {
color:#999;
text-shadow:0 0 0 transparent, 0 1px 0 #fff, 0 -1px 0 #555;
font-size:40px;
}


header h2 {
display:inline-block;
border: 1px dashed #999;
padding: 2px 10px 5px;
margin: 10px 0 0;
border-radius: 5px;
box-shadow: 0 1px 1px #fff;
font-size:20px;
}


nav {
background:url(img/nav-bg.png) no-repeat;
height: 90px;
width: 960px;
margin-left: -5px;
line-height:50px;
position: relative;
}


nav:after {
background:url(img/nav-shadow.png) transcend repeat-x;
position: middle;
height:30px;
width:980px;
left:10px;
top:60px;
content:”;
}


nav p {
padding: 0 70px;
}


nav a {
color:#fff;
text-shadow: 0 0 0 transparent, 0 -1px 1px #900;
}


#content {
background: #fff;
height: 1500px; /* presetting the superlative */
-webkit-box-shadow: 0 0 5px rgba(0,0,0,0.3);
box-shadow: 0 0 5px rgba(0,0,0,0.3);
}


#content p {
padding:20px 60px;
}


.fixed {
position:fixed;
}


<!–


a {color:blue;}
a:hover {text-decoration: underline;color:#E1B2B2;}
–>


Adding JQuery To Your Template:

Now We require to insert Jquery equally it is the exclusively affair which is responsible to brand your navigation bar Scrollable.
  • Go To Blogger.com >> Your Blog >> Layout >>  Add H5N1 Gadget  
  • Add Html/JavaScripts >> Then paste the next code in that location >> And save it.

<script type=”text/javascript” src=”http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js”></script>

<script type=”text/javascript”>

$(document).ready(function() {

//Calculate the superlative of <header>

//Use outerHeight() instead of height() if cause got padding

    var aboveHeight = $(‘header’).outerHeight();

// when scroll

    $(window).scroll(function(){
//if scrolled downwards to a greater extent than than the header’s height
        if ($(window).scrollTop() > aboveHeight){
// if yes, add together “fixed” course of report to the <nav>
// add together padding transcend to the #content (value is same equally the superlative of the nav)
            $(‘nav’).addClass(‘fixed’).css(‘top’,’0′).next().css(‘padding-top’,’60px’);
        } else {
// when scroll upward or less than aboveHeight, withdraw the “fixed” class, in addition to the padding-top
            $(‘nav’).removeClass(‘fixed’).next().css(‘padding-top’,’0′);
        }
    });
});
</script>


Making Your OLD Navigation Bar Scrollable:

Now this is the nearly of import measurement where nosotros volition covert your Static navigation bar into a scrolling navigation bar.simply give-up the ghost to
  • Blogger.com>>Template>>EDIT HTML>>Proceed>>
  • Now Search For your Navigation Category Name i.e Home or whatsoever other allow us take example of MyBloggerlab.com inwards the navigation bar I have Blogger Tricks as my second main category thence I volition search Blogger Tricks inwards the template Remember:The  category  you are searching should move the start i or second one inwards your navigation bar.
  • When yous detect it yous would move able to see I.e <div id=’Navbar’>  which is the ID of your navigation bar. .Remember:You Might non instruct the same div Id equally all the templates are differently coded but it would move related to it i.e  <div id=’Nav’> ,  <div id=’Navcontainer’>  id=’NavbarMenu’>  and etc
  • Now exactly higher upward the div id of your navigation bar paste <nav> 
  • Just later adding <nav> tag search for </div> which volition move at the cease of your navigation coding. Remember:You require to detect exactly next </div>  closing tag to your navigation settings
  • Replace </div> with  </div></nav>
  • And at i time Save your Template give-up the ghost in addition to preview your template in addition to it volition move a photograph finish

Still Confused 🙁 Watch This Video Tutorial 🙂


So thats how yous tin forcefulness out convert your static Navbar into a Sticky Scrollable Navigation bar.If yous experience whatsoever problem experience complimentary I would dear to deal you.This is the start always Scrollable Navigation Release over Blogger.So in that location are withal room for improvement in addition to from coming postal service surly more improved and optimized Scrollable Sticky bars would move shared till yous instruct it done till in addition to thence peace approbation happy scrolling:)

Hosting Unlimited Indonesia


Sumber http://www.mybloggerlab.com