Monday, 17 June 2013


Fancy CSS3 & jQuery Lavalamp Menu For Blogger






Menus are an important part of the website/blog. Colourful Menus Attracts the attention of the visitors easily and helps him or her to navigate through the blog.


Live Menu Demo


How To Add This Menu TO Blogger?

For easy understanding I am dividing the tutorial in three parts & they are as below,
  1. Adding Scripts
  2. Adding  Styles
  3. Adding The Menu

1. Adding Scripts

  1. Go to Blogger Dashboard > Template
  2. Click on Edit HTML
  3. Hit Proceed
  4. Find below code in your template

</head>

add below code just above it,(If you have already added a jQuery library to your blog then delete the highlighted code)

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script src="http://code.helperblogger.com/lavalamp-menu.js" type="text/javascript"></script>

2. Adding Styles


Now find below code,

]]></b:skin>


add below CSS code immediately before it,

/*LAVALAMP MENU BY http://www.helperblogger.com/ START*/

.lavalamp {
    position: relative;
    border: 1px solid #d6d6d6;
    background: #fff;
    padding: 15px;
    -webkit-box-shadow: 0 3px 6px rgba(0,0,0,.25);
 -moz-box-shadow: 0 3px 6px rgba(0,0,0,.25);
    border-radius : 10px;
    -moz-border-radius : 10px;
    -webkit-border-radius : 10px;
    background : -webkit-gradient(linear, left top, left bottom, from(rgb(240,240,240)), to(rgb(204,204,204)));
    background : -moz-gradient(linear, left top, left bottom, from(rgb(240,240,240)), to(rgb(204,204,204)));
 height: 18px;
        font-family: calibri;
}

.magenta {
 background : rgb(190,64,120);
 background : -webkit-gradient(linear, left top, left bottom, from(rgb(190,64,120)), to(rgb(177,24,91)));
 background : -moz-gradient(linear, left top, left bottom, from(rgb(190,64,120)), to(rgb(177,24,91)));
 border: 1px solid #841144;
 
}

.cyan {
 background : rgb(64,181,197);
 background : -webkit-gradient(linear, left top, left bottom, from(rgb(64,181,197)), to(rgb(7,165,187)));
 background : -moz-gradient(linear, left top, left bottom, from(rgb(64,181,197)), to(rgb(7,165,187)));
 border: 1px solid #2f8893;
 
}

.yellow {
 background : rgb(255,199,79);
 background : -webkit-gradient(linear, left top, left bottom, from(rgb(255,199,79)), to(rgb(255,188,43)));
 background : -moz-gradient(linear, left top, left bottom, from(rgb(255,199,79)), to(rgb(255,188,43)));
 border: 1px solid #c08c1f;
 
}

.orange {
 background : rgb(255,133,64);
 background : -webkit-gradient(linear, left top, left bottom, from(rgb(255,133,64)), to(rgb(255,107,24)));
 background : -moz-gradient(linear, left top, left bottom, from(rgb(255,133,64)), to(rgb(255,107,24)));
 border: 1px solid #c04f11;
 
}

.dark {
 background : rgb(89,89,89);
 background : -webkit-gradient(linear, left top, left bottom, from(rgb(89,89,89)), to(rgb(54,54,54)));
 background : -moz-gradient(linear, left top, left bottom, from(rgb(89,89,89)), to(rgb(54,54,54)));
 border: 1px solid #272727;
 
}

.magenta li a , .cyan li a, .yellow li a , .orange li a, .dark li a{
 color: #fff;
 text-shadow: 0 -1px 0 rgba(0,0,0,.40);
 
}

.lavalamp a {
    text-decoration: none;
    color: #262626;
    line-height: 20px;
}

.lavalamp ul {
    margin: 0;
    padding: 0;
    z-index: 300;
    position: absolute;
}

.lavalamp ul li {
    list-style: none;
    float:left;

    text-align: center;
    }

.lavalamp ul li a {
    padding: 0 20px;
    text-align: center;
    }

.floatr {
    position: absolute;
    top: 10px;
    z-index: 50;
    width: 70px;
    height: 30px;
    border-radius : 8px;
    -moz-border-radius : 8px;
    -webkit-border-radius : 8px;
    background : rgba(0,0,0,.20);
    -webkit-transition: all .4s ease-in-out;
    -moz-transition: all .4s ease-in-out;
}

/*LAVALAMP MENU BY http://www.helperblogger.com/ END*/


Now save your template.

3. Adding The Menu


Now come to Page Layout

  • Now come to Page Layout
  • Click on Add a Gadget (Below Header)
  • Choose HTML/JavaScript
  • Copy and paste below code inside it,

<div class="lavalamp dark">
 <ul>
  <li class="active"><a href="">Home</a></li>
  <li><a href="#">About</a></li>
  <li><a href="#">Blog</a></li>
  <li><a href="#">Services</a></li>
  <li><a href="#">Portfolio</a></li>
  <li><a href="#">Contacts</a></li>
  <li><a href="#">Back to Article</a></li>
  <li><<a href="#">How it Works?</a></li>
 </ul>
 <div class="floatr"></div>
</div>

  • Replace # with the links
  • Replace Home,About,Blog. etc. with your link text which you want to appear on the menu.
  • If you want to change background color of the menu then replace <div class="lavalamp dark"> with one of the code below.


<div class="lavalamp">
<div class="lavalamp magenta">
<div class="lavalamp cyan">
<div class="lavalamp yellow">
<div class="lavalamp orange">
<div class="lavalamp dark">

Finally save your widget and you are done.

I have tried my best to keep this tutorial as easy as possible,if still you are getting any single problem then feel free to share it below via comments,I will try to give reply as soon as time allows.

Tuesday, 21 May 2013

Scrolling Recent Posts Widget For Blogger




Scrolling recent posts gadget is one of the attractive and beautiful widget to show of the recent posts posted in your blog with jQuery scroll effect, which grabs the attention of visitors very easily.



Live Widget Demo ▼



How To Add Scrolling Recent Posts Widget To Blogger?


Step 1 -:

This widget works with jQuery spy effect so that we have to add jQuery library to our blog first (Note - Ignore this step if you have already added jQuery library to your blog.)

  1. Go to Blogger Dashboard > Template
  2. Click on Edit HTML
  3. Hit Proceed button
  4. Find below code in your template

</head>

add below code just above it,

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


Now you have implemented jQuery library into your blog.Now lets see how to add scrolling recent posts widget to blogger.

Step 2 -:

  1. Go to Blogger Dashboard > Layout
  2. Click on Add a Gadget
  3. Select HTML/JavaScript

Paste below code inside it,

<style type="text/css" media="screen">
<!--

/* ========== Scrolling Recent Posts Widget By helperblogger.com ======== */

#helperblogger-widget {
    overflow: hidden;
    margin-top: 5px;
    padding: 0px 0px;
    height: 385px;
}

#helperblogger-widget ul {
    width: 295px;
    overflow: hidden;
    list-style-type: none;
    padding: 0px 0px;
    margin: 0px 0px;
}

#helperblogger-widget li {
    width: 282px;
    padding: 5px 5px;
    margin: 0px 0px 5px 0px;
    list-style-type: none;
    float: none;
    height: 80px;
    overflow: hidden;
    background: #fff url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikOGmfWC0EEA2KohfOLp1J31Uq-tki1mvs127LzOJqqQVWT8z1hcrAW1Z8pXcHbZgOWoohhQyzR5MHVzhl82Oze8pZLEJ2S2umRSToP3IoZ-BPf-zGv__XxrVWjRlr0ERe4ZJ7EaKuam0/s1600/helperblogger.com-post.jpg) repeat-x;
    border: 1px solid #ddd;
}

#helperblogger-widget li a {
    text-decoration: none;
    color: #4B545B;
    font-size: 15px;
    height: 18px;
    overflow: hidden;
    margin: 0px 0px;
    padding: 0px 0px 2px 0px;
}

#helperblogger-widget img {
    float: left;
    margin-top: 10px;
    margin-right: 15px;
    background: #EFEFEF;
    border: 0;
}

#helperblogger-widget img {
    -webkit-transition: all 0.5s ease;
    -moz-transition: all 0.5s ease;
    transition: all 0.5s ease;
    padding: 4px;
    background: #eee;
    background: -webkit-gradient(linear, left top, left bottom, from(#eee), color-stop(0.5, #ddd), color-stop(0.5, #c0c0c0), to(#aaa));
    background: -moz-linear-gradient(top, #eee, #ddd 50%, #c0c0c0 50%, #aaa);
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    -webkit-box-shadow: 0 0 3px rgba(0,0,0,.7);
    -moz-box-shadow: 0 0 3px rgba(0,0,0,.7);
    box-shadow: 0 0 3px rgba(0,0,0,.7);
}

#helperblogger-widget img:hover {
    -moz-transform: scale(1.2) rotate(-350deg);
    -webkit-transform: scale(1.2) rotate(-350deg);
    -o-transform: scale(1.2) rotate(-350deg);
    -ms-transform: scale(1.2) rotate(-350deg);
    transform: scale(1.2) rotate(-350deg);
    -webkit-box-shadow: 0 0 20px rgba(255,0,0,.4), inset 0 0 20px rgba(255,255,255,1);
    -moz-box-shadow: 0 0 20px rgba(255,0,0,.4), inset 0 0 20px rgba(255,255,255,1);
    box-shadow: 0 0 20px rgba(255,0,0,.4), inset 0 0 20px rgba(255,255,255,1);
}

.spydate {
    overflow: hidden;
    font-size: 10px;
    color: #0284C2;
    padding: 2px 0px;
    margin: 1px 0px 0px 0px;
    height: 15px;
    font-family: Tahoma,Arial,verdana, sans-serif;
}

.spycomment {
    overflow: hidden;
    font-family: Tahoma,Arial,verdana, sans-serif;
    font-size: 10px;
    color: #262B2F;
    padding: 0px 0px;
    margin: 0px 0px;
}

/* ========== Scrolling Recent Posts Widget By helperblogger.com ======== */

-->
</style>

<script language='JavaScript'> 
imgr = new Array();
imgr[0] = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqyybsZFYlzY4jLFP0rBVEW8ouN-eDF-O1R1t5pV5v67-eQ2i2R_Mzxv5jknJClAODn4s5DXMQBcJW5aSnmwU0SbLbPVOCUXvIBHPlq8KzAWuPGqxZtj6TU2euqVwlXCJx9JujSLf9_UM/s1600/no-thumbnail.png";
imgr[1] = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqyybsZFYlzY4jLFP0rBVEW8ouN-eDF-O1R1t5pV5v67-eQ2i2R_Mzxv5jknJClAODn4s5DXMQBcJW5aSnmwU0SbLbPVOCUXvIBHPlq8KzAWuPGqxZtj6TU2euqVwlXCJx9JujSLf9_UM/s1600/no-thumbnail.png";
imgr[2] = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqyybsZFYlzY4jLFP0rBVEW8ouN-eDF-O1R1t5pV5v67-eQ2i2R_Mzxv5jknJClAODn4s5DXMQBcJW5aSnmwU0SbLbPVOCUXvIBHPlq8KzAWuPGqxZtj6TU2euqVwlXCJx9JujSLf9_UM/s1600/no-thumbnail.png";
imgr[3] = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqyybsZFYlzY4jLFP0rBVEW8ouN-eDF-O1R1t5pV5v67-eQ2i2R_Mzxv5jknJClAODn4s5DXMQBcJW5aSnmwU0SbLbPVOCUXvIBHPlq8KzAWuPGqxZtj6TU2euqVwlXCJx9JujSLf9_UM/s1600/no-thumbnail.png";
imgr[4] = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqyybsZFYlzY4jLFP0rBVEW8ouN-eDF-O1R1t5pV5v67-eQ2i2R_Mzxv5jknJClAODn4s5DXMQBcJW5aSnmwU0SbLbPVOCUXvIBHPlq8KzAWuPGqxZtj6TU2euqVwlXCJx9JujSLf9_UM/s1600/no-thumbnail.png";
showRandomImg = true;
boxwidth = 255;
cellspacing = 6;
borderColor = "#232c35";
bgTD = "#000000";
thumbwidth = 50;
thumbheight = 50;
fntsize = 15;
acolor = "#666";
aBold = true;
icon = " ";
text = "comments";
showPostDate = true;
summaryPost = 40;
summaryFontsize = 10;
summaryColor = "#666";
icon2 = " ";
numposts = 10;
home_page = "http://www.helperblogger.com/";
limitspy=4;
intervalspy=4000;
</script>

<div id="helperblogger-widget">
<script src='http://code.helperblogger.com/recent-posts-spy.js' type='text/javascript'></script>
</div>


Now replace http://www.helperblogger.com/ with your blog URL.

Widget Customizations

As I mentioned above this widget is fully customizable,you can also customizing it at your own just by reading the properties of the values such as numposts meansnumber of posts.In above code I am highlighting some values which you can simply edit them.Also I highly recommend you that,done all the changes in our HTML Editor.With using the html editor you can simply customize this widget as you wish with watching preview of your chnages.
Below I am describing some important values,

  • numposts = 10; Total number of posts which you wants to scroll by this widget
  • limitspy=4; Number of the posts to appear on the widget
  • intervalspy=4000; Scrolling speed of the widget,if you decreased the value speed of widget will increases.
Finally save your all changes and visit you blog to see the working widget.