Showing posts with label Widgets. Show all posts
Showing posts with label Widgets. Show all posts

How To Add A Thumbnail Photos Gallery In Blogger

Many users want to show their photos in thumbnails, Its just for to show their blog more attractive. So i realize that i should post about that how we can add a thumbnail photo gallery in Blogger. With the help of CSS we can make the <img> element to display on same position with rest of with thumbs and style the thumbnails as small blocks with a defined height/width. The script will add a click-event for each <li> object that changes its child's <img> visibility and will assign an "Active" class name to the <li> .

How To Add Image Gallery With Thumbnails To Blogger :

Step 1. Go to Dashboard > Template > Edit HTML


Step 2. Click anywhere in the code and press CTRL + F to open search box for code. Type the following tag in the search box and press Enter.
</head>
Step 3. Copy the following code and paste it above </head> tag.
<style type='text/css'>
#image-gallery { display: none; }
#jquery-gallery {padding:0;margin:0;list-style: none; width: 200px; }
#jquery-gallery li {background-size: 100%;-webkit-background-size: cover;-moz-background-size: cover; -o-background-size: cover;background-size: cover;margin-right: 10px; width: 80px; height: 80px; border: 3px solid #fff; outline: 1px solid #ddd; margin-right: 10px; margin-bottom: 10px; opacity: .5;filter:alpha(opacity=50); float: left; display: block; }
#jquery-gallery li img { position: absolute; top: 0px; left: 200px; display: none; }
#jquery-gallery li.active img { display: block; width:370px; border: 3px solid #fff; outline: 1px solid #E3E3E3; }
#jquery-gallery li.active, #jquery-gallery li:hover { outline-color: #bbb; opacity: .99;filter:alpha(opacity=99);}
#gallery-caption { position: absolute; right: 50px;color: #000;background: #FFFFFF;font-weight: bold; font-size: 16px; top: 0px;}
</style>
Step 4. Now above the same tag </head> paste this script.
 <script type='text/javascript'>
//<![CDATA[
var gal = {
init : function() {
if (!document.getElementById || !document.createElement || !document.appendChild) return false;
if (document.getElementById('image-gallery')) document.getElementById('image-gallery').id = 'jquery-gallery';
var li = document.getElementById('jquery-gallery').getElementsByTagName('li');
li[0].className = 'active';
for (i=0; i<li.length; i++) {
li[i].style.backgroundImage = 'url(' + li[i].getElementsByTagName('img')[0].src + ')';
li[i].title = li[i].getElementsByTagName('img')[0].alt;
gal.addEvent(li[i],'click',function() {
var im = document.getElementById('jquery-gallery').getElementsByTagName('li');
for (j=0; j<im.length; j++) {
im[j].className = '';
}
this.className = 'active';
document.getElementById('gallery-caption').innerHTML = this.title;
});
}
},
addEvent : function(obj, type, fn) {
if (obj.addEventListener) {
obj.addEventListener(type, fn, false);
}
else if (obj.attachEvent) {
obj["e"+type+fn] = fn;
obj[type+fn] = function() { obj["e"+type+fn]( window.event ); }
obj.attachEvent("on"+type, obj[type+fn]);
}
}
}
gal.addEvent(window,'load', function() {
gal.init();
});
//]]>
</script>
Step 5. Now simply Save Template

Step 6. Now go to the Layout section Add a Gadget , Select Html/Javascript


Step 7. Now copy and below code and paste in into Html/Javascript
<div style="position:relative;">
<ul id="image-gallery">
<li><img src="IMAGE-URL1" /></li>
<li><img src="IMAGE-URL2" /></li>
<li><img src="IMAGE-URL3" /></li>
<li><img src="IMAGE-URL4" /></li>
<li><img src="IMAGE-URL5" /></li>
</ul>
</div>
Save you widget and Save your settings :)


How To Add A Responsive Mobile Drop Down Menu In Blogger

How To Add A Responsive Drop Down Menu In Blogger ? This is the question which is searched in Google many times, So today i will tell you that how we can add a responsive menu in Blogger. You just have to follow these simple and easy steps.



Step 1. Go to Blogger Dashboard > Layout > Add Widget , and paste the following code in Html/Javascript.
<!---Menu--> <nav id='nav-main'>
    <ul>
        <li><a href=''>Home</a></li>
        <li><a href=''>About</a></li>
        <li><a href=''>Gallery</a></li>
        <li><a href=''>Tutorials</a></li>
        <li><a href=''>Contact</a></li>
    </ul>
</nav>
<div id='nav-trigger'>
    <span>Menu <i class='fa fa-list'/></span>
</div>
<nav id='nav-mobile'/>
</div>
After pasting the code click on Save button to save the code.

Step 2. Go to Template > Edit HTML , Click anywhere in code and press CTRL + F to open search box, type or paste this code in search box and press enter.
]]></b:skin> 
Step 3. Paste the following code below ]]></b:skin>
#nav-trigger {
        display: none;
        text-align: center;
    }
    #nav-trigger span {
        display: block;
        background-color: #279CEB;
        cursor: pointer;
        text-transform: uppercase;
        padding: 0 25px;
        color: #EEE;
        line-height: 67px;
    }
    nav#nav-mobile {
        margin: 0px;
    }
    nav {
        margin-bottom: 30px;
    }
    nav#nav-main {
        background-color: #279CEB;
        margin: 0px;
        float: left;
    }
    nav#nav-main ul {
        list-style-type: none;
        margin: 0;
        padding: 0;
        text-align: center;
    }
    nav#nav-main li {
        display: inline-block;
        float: left;
        ont-family: 'Open Sans', sans-serif;
    }
    nav#nav-main li:last-child {
        border-right: none;
    }
    nav#nav-main a {
        padding: 0 25px;
        color: #EEE;
        line-height: 67px;
        display: block;
    }
    nav#nav-main a:hover {
        background-color: #3AB0FF;
        text-decoration: none;
        color: #fff;
    }
    nav#nav-mobile {
        position: relatifve;
        display: none;
    }
    nav#nav-mobile ul {
        display: none;
        list-style-type: none;
        position: absolute;
        left: 0;
        right: 0;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
        background-color: #ddf0f9;
        z-index: 10;
        padding: 0px;
        border-bottom: solid 1px #cc0028;
    }
    nav#nav-mobile li:last-child {
    border-bottom: none;
    }
    nav#nav-mobile a {
    display: block;
    color: #29a7e1;
    padding: 10px 30px;
    text-decoration: none;
    border-bottom: 1px solid #00aeef;
    }
    nav#nav-mobile a:hover {
    background-color: #e6002d;
    color: #fff;
    }
/* =Media Queries
    ---------------------------------------------------- */
    @media all and (max-width: 900px) {
    #nav-trigger {
        display: block;
    }
    nav#nav-main {
        display: none;
    }
    nav#nav-mobile {
        display: block;
    }
    }
 Step 4. Search </head> tag in by typing or pasting this tag in search box and paste the following code just above the </head> tag.
 
<script type='text/javascript'>
    //<![CDATA[
    $(document).ready(function(){
        $("#nav-mobile").html($("#nav-main").html());
        $("#nav-trigger span").click(function(){
            if ($("nav#nav-mobile ul").hasClass("expanded")) {
                $("nav#nav-mobile ul.expanded").removeClass("expanded").slideUp(250);
                $(this).removeClass("open");
            } else {
                $("nav#nav-mobile ul").addClass("expanded").slideDown(250);
                $(this).addClass("open");
            }
        });
    });
    //]]>
    </script>

Now click on Save Template button to save changes.


How To Change User's Profile Picture Size In Blogger Comment

Sometimes we get many headache about the difficulties in blogger that how we can solve it, But every problem has the solution so don't worry. Today i will tell you that how we can change the user's profile picture size in Blogger comment.

Step 1. Go to Dashboard - Template > Edit HTML


Click anywhere in the code and press CTRL+F to open search box.

Step 2. Type or paste this tag inside the search box and press enter.
]]></b:skin>
Step 3. Depending on which comment system you use (with reply/no reply) , copy and paste on of the following code just above it:

(Works in Blogger threaded comment system)
 .comments .avatar-image-container{
background-color: rgb(34, 34, 34);
border:1px solid #ccc;
margin: 0px 10px 0px 0px;
padding: 0px 0px 0px 0px;
width: 64px;
max-height: 64px;
}
.comments .avatar-image-container img{
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
max-width: 64px;
height: 64px;
}
(For old Blogger commenting system)
 .avatar-image-container{border:1px solid #d6d6d6;margin-left: -30px;-moz-border-radius: 4px;background:#fff;height:70px;min-height: 70px;width:70px;min-width:70px;}.avatar-image-container img {background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqNQo5ZGwYSbf49LLg4QPLOJ0RFir-KvVI0HMzMGyRxg2hk6FfdziNCqqfxUmc5RTsnWIzh7R4TMORbSfrU-LkV8midPQJV7-_wH-Bj4AZvF2zhTTZJRGVfOksGbfn6YvvkmMyJ_x6xKo/s200/anonymous.jpg);background-repeat: no-repeat;background-position: center;background-size: 100%;width:70px;min-width:70px;height:70px;min-height:70px;
} 
Step 4. Click on Save Template button to apply changes.

jQuery Image Slider Widget For Blogger

In this tutorial you will learn that how can we add a jQuery image slider to our website or blog. The process is very easy, the slider's main point of view is to interact visitors and for the beauty of your blog/site. You can put it on a specific page or on the homepage.

How to add the Orbit Image Slider for Blogger ?

Step 1. From your Blog Dashboard, go to Template > Edit HTML > click anywhere inside the code area and press the CTRL + F keys to open the blogger search box. Paste or type the below tag in search box and press enter to find it.
</head>
Step 2. Just above </head> add the following script.
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js' type='text/javascript'/>

<!--[if IE]>
<style type="text/css">
.timer { display: none !important; }
div.caption { background:transparent; filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000,endColorstr=#99000000);zoom: 1; }
</style>
<![endif]-->

<script type='text/javascript'>
$(window).load(function() {
$(&#39;#featured&#39;).orbit({
advanceSpeed: 5000,
&#39;bullets&#39;: true,
&#39;timer&#39; : true,
&#39;animation&#39; : &#39;horizontal-slide&#39;
});
});
</script>

<script type='text/javascript'>
//<![CDATA[
/*
* jQuery Orbit Plugin 1.1
* www.ZURB.com/playground
* Copyright 2010, ZURB
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/

(function(e){e.fn.orbit=function(a){a=e.extend({animation:"fade",animationSpeed:800,advanceSpeed:4E3,startClockOnMouseOut:true,startClockOnMouseOutAfter:3E3,directionalNav:true,captions:true,captionAnimationSpeed:800,timer:false,bullets:false},a);return this.each(function(){function m(c){function g(){f.eq(h).css({"z-index":1});s=false}var h=b,k=c;if(h==k)return false;if(!s){s=true;if(c=="next"){b++;if(b==n)b=0}else if(c=="prev"){b--;if(b<0)b=n-1}else{b=c;if(h<b)k="next";else if(h>b)k="prev"}a.bullets&&
x();if(a.animation=="fade"){f.eq(h).css({"z-index":2});f.eq(b).css({opacity:0,"z-index":3}).animate({opacity:1},a.animationSpeed,g);a.captions&&o()}if(a.animation=="horizontal-slide"){f.eq(h).css({"z-index":2});k=="next"&&f.eq(b).css({left:t,"z-index":3}).animate({left:0},a.animationSpeed,g);k=="prev"&&f.eq(b).css({left:-t,"z-index":3}).animate({left:0},a.animationSpeed,g);a.captions&&o()}if(a.animation=="vertical-slide"){f.eq(h).css({"z-index":2});k=="prev"&&f.eq(b).css({top:u,"z-index":3}).animate({top:0},
a.animationSpeed,g);k=="next"&&f.eq(b).css({top:-u,"z-index":3}).animate({top:0},a.animationSpeed,g);a.captions&&o()}}}var b=0,n=0,t,u,s,d=e(this).addClass("orbit"),f=d.find("img, a img");f.each(function(){var c=e(this),g=c.width();c=c.height();d.width(g);t=d.width();d.height(c);u=d.height();n++});f.eq(b).css({"z-index":3});if(a.timer){d.append('<div class="timer"><span class="mask"><span class="rotator"></span></span><span class="pause"></span></div>');var j=e("div.timer"),p;if(j.length!=0){var C=
a.advanceSpeed/180,v=e("div.timer span.rotator"),y=e("div.timer span.mask"),z=e("div.timer span.pause"),l=0,A,w=function(){p=true;z.removeClass("active");A=setInterval(function(){var c="rotate("+l+"deg)";l+=2;v.css({"-webkit-transform":c,"-moz-transform":c,"-o-transform":c});if(l>180){v.addClass("move");y.addClass("move")}if(l>360){v.removeClass("move");y.removeClass("move");l=0;m("next")}},C)},q=function(){p=false;clearInterval(A);z.addClass("active")};w();j.click(function(){p?q():w()});if(a.startClockOnMouseOut){var B;
d.mouseleave(function(){B=setTimeout(function(){p||w()},a.startClockOnMouseOutAfter)});d.mouseenter(function(){clearTimeout(B)})}}}if(a.captions){d.append('<div class="caption"><span class="orbit-caption"></span></div>');var r=d.children("div.caption").children("span").addClass("orbit-caption").show(),o=function(){var c=f.eq(b).attr("rel"),g=e("#"+c).html(),h=r.height()+20;r.attr("id","#"+c).html(g);g?r.parent().stop().animate({bottom:0},a.captionAnimationSpeed):r.parent().stop().animate({bottom:-h},
a.captionAnimationSpeed)};o()}if(a.directionalNav){d.append('<div class="slider-nav"><span class="right">Right</span><span class="left">Left</span></div>');j=d.children("div.slider-nav").children("span.left");var D=d.children("div.slider-nav").children("span.right");j.click(function(){a.timer&&q();m("prev")});D.click(function(){a.timer&&q();m("next")})}if(a.bullets){d.append('<ul class="orbit-bullets"></ul>');var E=e("ul.orbit-bullets");for(i=0;i<n;i++){j=e("<li>"+i+"</li>");e("ul.orbit-bullets").append(j);
j.data("index",i);j.click(function(){a.timer&&q();m(e(this).data("index"))})}var x=function(){E.children("li").removeClass("active").eq(b).addClass("active")};x()}})}})(jQuery);
//]]>
</script>
Step 3. Now its time to add the CSS. Find (CTRL +F) this tag:
]]></b:skin>
Step 4. Just above ]]></b:skin> add this code:
 #featured {height: 1px; width: 1px; overflow: hidden;}
div.orbit {
width: 1px;
height: 1px;
position: relative;
overflow: hidden;
}

div.orbit img {
position: absolute;
top: 0;
left: 0;
}
div.orbit a img {border: none;}

div.timer {
width: 40px;
height: 40px;
overflow: hidden;
position: absolute;
top: 10px;
right:10px;
opacity: .6;
cursor: pointer;
z-index: 1001;
}

span.rotator {
display: block;
width: 40px;
height: 40px;
position: absolute;
top: 0;
left: -20px;
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjeAUeJP2W1T74SJLCdFRMRpNoNJEmtjYG1lIQx1Fl1PJug4yewXZ-IOJ5e42n56X9R6MUuAHGKNrw4gsSSbiB3A1Di9iaRRABRSf6Y6NUhKW3tooMIIJMPNzotYDpq-Ik3InW_BxCmF9H/s1600/timer-icon.png);
background-repeat: no-repeat;
z-index: 3;
}

span.mask {
display: block;
width: 20px;
height: 40px;
position: absolute;
top: 0;
right: 0;
z-index: 2;
overflow: hidden;
}

span.rotator.move {left: 0;}
span.mask.move {
width: 40px;
left: 0;
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYyJFOnUcjl86egX_4jnizTgis4HHuvS_tPjc0H-ivPBqtTtn7y4p80rOQTGnj6njZ5KxZfLdiAJMBrXV_KAxIEP0WsVnow_iUuTNm-1oanq0hkko3lSBSesKa1CD5wyUOprvFw6wm8iyS/s1600/timer-right.png);
background-repeat: repeat;
background-position: 0px 0px;
}

span.pause {
display: block;
width: 40px;
height: 40px;
position: absolute;
top: 0;
left: 0px;
background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhB3N7kCHFhk3se2m7QMW6C2JyAYtUfqgZJ64EgmojqKraP3buOI59HuErvUYiKi6s5t4WguXmX0rr770zbTgG9BnWTdjfCtfPEwqBvJzS4QtW47eQESHvV394nR1b9T_qUfWWvZoqYjzqq/s1600/pause-icon.png);
background-repeat: no-repeat;
z-index: 4;
opacity: 0;
}

div.timer:hover span.pause,
span.pause.active,
div.timer:hover span.pause.active { opacity: 1; }

div.caption {
background: #000;
background: rgba(0,0,0,.6);
width: 100%;
z-index: 1000;
position: absolute;
bottom:-100px;
color: #fff;
padding: 8px 0;
text-align: center;
}

div.caption span {
padding: 0 10px;
font-size: 14px;
text-shadow: 0px 1px 0px rgba(0,0,0,.8);
margin: 0;
}
.orbit-caption { display: none; }

div.orbit:hover div.slider-nav { display: block; }
div.slider-nav { display: none; }
div.slider-nav span {
width: 33px;
height: 33px;
text-indent: -9999px;
position: absolute;
z-index: 1000;
top: 43%;
cursor: pointer;
}

div.slider-nav span.right {
background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgF8xfp5hts8PB9bBzCrjvJXWmivPqNU67Fhqp-qS48KDUs_zR2Am-3YbA2TDW1sc7x_ZU1X3-K9-15h0WLtN0OT_PQTbpIHVxbmNXnpXNaIPbpSBA-a_GksguO4wC0FW-oUJ7jqDOX9niE/s1600/arrow-right.png);
right: 10px;
}
div.slider-nav span.left {
background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLLbiGSDHCNtlzVw9dHG4rjm9TczyRTdJh0AwbxQ9eSHEcQwYanoflZxRas2SqV-Rx63kzjzt_ssJXY8tW8ga-9QXislXYK-MdWR4xBnCFmxhPDWI46oLzaEMR4pMgCxBhkgqGONC2XTQc/s1600/arrow-left.png);
left: 10px;
}

.orbit-bullets {
position: absolute;
z-index: 1000;
list-style: none;
top: 10px;
left: 7px;
margin: 0;
padding: 0;
}

.orbit-bullets li {
float: left;
margin-left: 5px;
cursor: pointer;
color: #999;
text-indent: -9999px;
background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhy0ecTxlLa5QpL84JdXzHDMfDdfvOzpUirBokM4rNmM1dHMGHqhV_qkFlHMPjxnF60NNhfaMjFChi7hGNQ0jxjLDBqMOBR4lwD7T6OgcV4L22P8SNc5Ea2Kg_ugbV6VltDfkwguxOyFkeW/s1600/bullets.png);
background-repeat: no-repeat;
background-position: 0 0;
width: 7px;
height: 7px;
overflow: hidden;
}
.orbit-bullets li.active { color: #222; background-position: -7px 0; }
Step 5. Click on the Save Template button to save the changes.