Wednesday, February 8, 2012

Disappearing Navigation bar: Cool Trick for Blogger Blogs


If you happen to be blogging using blogger, and would like to gain a little bit of real estate, here's a cool trick!  By simply adding a little code in your design via a gadget, your navigation bar (the strip along the top of your blog) will only be visible when it's hovered over.  Wanna try it?  Just do this:




How To Make Your Blog's Navigation Bar Disappear 
  1. Go to the "Design" tab 
  2. "Add a Gadget" 
  3. Select  HTML/JavaScript Add
  4. Copy the text below: and paste in the "Content" window, then save, and you're done!  :) 
<!-- DROPDOWN NAVBAR -->
<!-- stylesheet for FF2, Op9, IE7 (strict mode) -->
<style type="text/css">
#navbar {
display:inline;
width:100%;
position:absolute;
background-color:transparent;
top:-30px;
left:0px;
height:60px;
z-index:999999;
}
#navbar:hover{
top:0px;
height:30px;
}
</style>
<!-- stylesheet for IE6 and lower -->
<!-- (not supporting element:hover) -->
<!-- first, unhide the navbar through css -->
<!-- second, hide the navbar and mimic -->
<!-- the effect with javascript, if available -->
<!--[if lt IE 7]>
<style type="text/css">
#navbar {
height:30px;
top:0px;
}
</style>
<script type="text/javascript">
var navbar = document.getElementById('navbar');
if(navbar){
navbar.onmouseover = function(){
navbar.style.top = '0px';
navbar.style.height = '30px';
}
navbar.onmouseout = function(){
navbar.style.top = '-30px';
navbar.style.height = '60px';
}
if (navbar.captureEvents){
navbar.captureEvents(Event.MOUSEOVER);
navbar.captureEvents(Event.MOUSEOUT);
}
navbar.onmouseout();
}
</script>
<![endif]-->
<!-- end dropdown navbar -->

No comments:

Post a Comment