Add Amazing CSS3 Carousel Slider in your Blog

Add Amazing CSS3 Carousel Slider in your Blog

31
data:blog.title
Slider widget

Carousel Slider is one of the best widget to display your featured post common way. It Is very popular because you it take small space and load faster. Most of the Carousel Slider able to display infinity posts. There are various use of this slider. Best user of Carousel Slider are movie and games based site. You can easily add your featured or latest movie and games through Carousel Slider. It make navigation friendly for this reason a visitors can easily navigate to specific post easily. Though we generally use Carousel Slider at the top area (below header) of the blogger template, as a result when a visitors visit your landing page then they can easily see the hottest posts. So I have tried to make little variation in Carousel Slider widget. This Carousel Slider is not like common one that a right or left button for scrolling rather I have added on this Carousel Slider mouse over scrolling effect. When you take your mouse pointer on right or left site of featured posts then it will scroll automatically. As well as a transparent caption will appear where you can simply write the content name. Another feature of this widget is that you can add infinity content. But this Carousel Slider you have to maintain manually.


For using this slider you have to select image and resize it to 150px width X 120px Height and upload it in any hosting server (e.g. Google, Photobucket, Image Shark) then get the link and finally add it into Carousel Slider.

Live Demo

So let’s proceed to the tutorial to install it into your blog. You can add this slider below header of above footer section. Just follow the below simple steps-

Step 1 Log in to your Blogger account and Go to your Blogger Dashboard

Step 2 Go to your Layout tab.

Step 3 Click on "Add a Gadget" then select "HTML/JavaScript" Gadget.

Step 4 Now Copy the below code and paste it in "HTML/JavaScript" Gadget and Save it.


Step 5 Place the Gadget below header. that's it.

<style>
#BloggerSpiceCarouselSlider {
  height:130px;
  background-color:#333333;
  border:10px solid #000000;
  position:relative;
  margin:50px 50px;
  overflow:auto;
}
/* CarouselSlider by www.bloggerspice.com  */
#BloggerSpiceCarouselSlider:before,
#BloggerSpiceCarouselSlider:after {
  content:"";
  display:block;
  position:absolute;
  top:0;
  bottom:0;
  left:-4px;
  width:4px;
  height:100%;
  box-shadow:0 0 4px black;
  z-index:10;
}
#BloggerSpiceCarouselSlider:after {
  left:auto;
  right:-4px;
}
#BloggerSpiceCarouselSlider .container {
  position:absolute;
  top:0;
  left:0;
  margin:5px 0 0 5px;
  width:300%;
  height:120px;
}
#BloggerSpiceCarouselSlider figure {
  display:block;
  background-color:white;
  float:left;
  width:150px;
  height:120px;
  margin:0 5px 0 0;
  position:relative;
  overflow:hidden;
}
#BloggerSpiceCarouselSlider figcaption {
  display:block;
  position:absolute;
  right:0;
  bottom:-50px;
  left:0;
  background-color:black;
  font:italic normal 11px Arial,Sans-Serif;
  color:white;
  padding:4px 10px;
  text-align:left;
  opacity:.8;
}
#BloggerSpiceCarouselSlider figure img {
  display:block;
  border:none;
  margin:0 0;
}
</style>
<div id="BloggerSpiceCarouselSlider">
    <div class="container">
        <figure>
            <a href="#" title="Title for Caption">
                <img alt="" src="http://1.bp.blogspot.com/-EE_tp-P3r9A/UfYvm5HykII/AAAAAAAAEJY/NuTPF5nNasA/s1600/7.jpg" />
            </a>
        </figure>
        <figure>
            <a href="#" title="Title for Caption">
                <img alt="" src="http://2.bp.blogspot.com/-bp70bq1oUmE/UfYvnxZrc-I/AAAAAAAAEJs/ESVCQ3EKimk/s1600/9.jpg" />
            </a>
        </figure>
        <figure>
            <a href="#" title="Title for Caption">
                <img alt="" src="http://3.bp.blogspot.com/-cqHmDnU6IUo/UfYvkiKD-pI/AAAAAAAAEIs/6rNbrWl2n5U/s1600/10.jpg" />
            </a>
        </figure>
  <figure>
            <a href="#" title="Title for Caption">
                <img alt="" src="http://4.bp.blogspot.com/-zneaAHQlNgI/UfYvnaCia6I/AAAAAAAAEJc/aKEJCLOExJA/s1600/8.jpg" />
            </a>
        </figure>
        <figure>
            <a href="#" title="Title for Caption">
                <img alt="" src="http://3.bp.blogspot.com/-0l9Jf0vageQ/UfYvmpUuOKI/AAAAAAAAEJk/6412AvMPgJs/s1600/6.jpg" />
            </a>
        </figure>
        <figure>
            <a href="#" title="Title for Caption">
                <img alt="" src="http://1.bp.blogspot.com/-oe6eNCRFrPs/UfYvlop75fI/AAAAAAAAEJE/atL7k6y5bpI/s1600/4.jpg" />
            </a>
        </figure>
  <figure>
            <a href="#" title="Title for Caption">
                <img alt="" src="http://4.bp.blogspot.com/-a5Ek7XZxIyE/UfYvlUlOyxI/AAAAAAAAEJM/XyZzkVtklF4/s1600/3.jpg" />
            </a>
        </figure>
        <figure>
            <a href="#" title="Title for Caption2">
                <img alt="" src="http://1.bp.blogspot.com/-xarVMAVA3YU/UfYvkhm4MCI/AAAAAAAAEIw/cehXZF6MeRw/s1600/2.jpg" />
            </a>
        </figure>
        <figure>
            <a href="#" title="Title for Caption">
                <img alt="" src="http://4.bp.blogspot.com/-A6GKQkWlf4o/UfYvkYZjF0I/AAAAAAAAEIo/goOT3YD4D_Y/s1600/1.jpg" />
            </a>
        </figure>
    </div>
</div>

<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script type='text/javascript'>//<![CDATA[
(function($) {
    var config = {
        itemMargins: 5 // Distance between the thumbnails
    };
    var $thumbnailScroller = $('#BloggerSpiceCarouselSlider'),
        $container = $thumbnailScroller.find('.container'),
        $item = $container.find('figure'),
        item_length = $item.length,
        item_width = $item.outerWidth(),
        item_margin = config.itemMargins,
        total_width = (item_width + item_margin) * item_length,
        $window = $(window);
    $thumbnailScroller.css('overflow', 'hidden');
    $container.css('width', total_width);
    // Auto caption builder & hover effect
    $item.each(function(cap) {
        if ($(this).children().attr('title')) {
            cap = $(this).children().attr('title');
            $(this).children().removeAttr('title');
            $(this).append('<figcaption>' + cap + '</figcaption>');
        }
    }).hover(function() {
        $(this).find('figcaption').stop().animate({
            bottom: 0
        }, 200);
    }, function() {
        $(this).find('figcaption').stop().animate({
            bottom: -50
        }, 200);
    });
    $window.on("resize", function() {
        var o_l = $thumbnailScroller.offset().left,
            t_w = $thumbnailScroller.width(),
            c_w = total_width;
        $thumbnailScroller.on("mousemove", function(e) {
            if ($(this).width() < $container.width()) {
                $container.css('left', -((e.pageX - o_l) * (c_w - t_w) / t_w));
            }
        });
    }).trigger("resize");
})(jQuery);
//]]>
</script>


Customization

  • Change #333333 for Background color of CarouselSlider
  • Change #000000for Border colorCarouselSlider
  • Replace # with post link
  • Alter Title for Caption with Post title
  • Replace Image URL Here with post Image link
  • To add more link just add code like below after </figure>
 <figure>
            <a href="#" title="Title for Caption">
                <img alt="" src="Image URL Here" />
            </a>
        </figure>

If you need any help just feel free to contact me. I will help you to solve your problem.
Add Amazing CSS3 Carousel Slider in your Blog
4 Stars stars - "Add Amazing CSS3 Carousel Slider in your Blog" Carousel Slider is one of the best widget to display your featured post common way. It Is very...

Oh! Great Bro Keep It Up Thinking For Use It

Nice Sharing brother this slider help us very much
thank you for sharing

Brother, you as always Bravo . you are cool.
was looking it for my new blog.
thanks a lot.
your blog is turning a great resource.
keep it going.

my small blog
www.parallelblogging.blogspot.com

yeh Rizwan specially for highlighting featured posts. Thanks to see you here.

Thanks dilip for a beautiful comment.

Thanks Bro Great Widget ...But Bro It Should Automatically Moves ...And I want to add extra urls what to to do......

Hi Nauman,I have update this post for adding new links. for adding more link follow the updates from end of the posts.

Hotep
Great widget! I am already using it on my blog.I have one question,how do you make it only display on homepage.I added conditional tags that are supposed to make it show only my homepage,but it still shows on all other pages.my blog is www.knightsofimhotepebooklibrary.blogspot.com.

Thanks

Bro this widget is combination of CSS+JavaScript+CSS so its bit critical to add conditional tag. I will design different one where you can apply conditional tag. And thanks for your comment.

Mohammad Fazle Rabbi Please Follow My Blogger And Like My Facebook Page Pleaseeeee My Name Is Faiq-Ul-Hussain

Mohammad Fazle Rabbi Please Follow My Blogger And Like My Facebook Page Pleaseeeee My Name Is Faiq-Ul-Hussain

Mohammad Fazle Rabbi Please Follow My Blogger And Like My Facebook Page Pleaseeeee My Name Is Faiq-Ul-Hussain

Mohammad Fazle Rabbi Please Follow My Blogger And Like My Facebook Page Pleaseeeee My Name Is Faiq-Ul-Hussain

Mohammad Fazle Rabbi Please Follow My Blogger And Like My Facebook Page Pleaseeeee My Name Is Faiq-Ul-Hussain

great thanks brother
regars from

shayrikiduniya.com and mypremiumtrick.shayrikiduniya.com

Is there anyway to make this carousel work in the presence of another caursel on your page.Im trying to add multiple slides but this one makes my other featured content slider not work

Hi Asar..of course it will work..but you have to use JS file only once..suppose I have used https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js file in the above tutorial. So if you want to use 2nd carousel then you must remove this js code line. Still confused :-? Duplication of JavaScript create conflict between 2 widget so use only one time.

. you are cool.
was looking it for my blog.
thanks a lot.

my blog is urweb4u.blogspot.com

Thanks very much for this post Mohammad but i have a little problem with the size of the images what can i do for get the images goodlooking

Hi Schon..Thank for dropping your comment. For changing the image you have to do it manually by using any Photo editing software like PhotoShop or any other online photo editing tools. And make the image size 150px width and 120px Height. After re-sizing upload image in any image hosting server and add the image URL in widget code. Thank you.

NO MORE...... I LIKE YOU, I LIKE THE BED YOU

Thanks Giaitri.. for dropping your comment. :-d

Sir, it is being displayed vertically without front or back options please help, my site, http://musicmasti823.blogspot.com

In this case you can use Random post widget. Please visit the below URL for the widget.


http://www.bloggerspice.com/2013/09/add-random-post-widget-with-large-wide.html

Anonymous 8/13/2016

how can i use it inside blogger post
i tried to use it but it work well .. it only work good when i put it into gadget html/js
any idea ...
please help..

To make it work inside Blog Post please follow the below instruction...

Step #1: Log in to your "Blogger account" and Go to your "Blogger Dashboard"

Step #2: From Blogger Dashboard Click on -> Template -> Edit HTML

Step #3: Now Find this code ]]></b:skin> by pressing Ctrl+F (Windows) or CMD+F (Mac)

Step #4: Paste the below code Before/above]]></b:skin>


#BloggerSpiceCarouselSlider {
height:130px;
background-color:#333333;
border:10px solid #000000;
position:relative;
margin:50px 50px;
overflow:auto;
}
/* CarouselSlider by www.bloggerspice.com */
#BloggerSpiceCarouselSlider:before,
#BloggerSpiceCarouselSlider:after {
content:"";
display:block;
position:absolute;
top:0;
bottom:0;
left:-4px;
width:4px;
height:100%;
box-shadow:0 0 4px black;
z-index:10;
}
#BloggerSpiceCarouselSlider:after {
left:auto;
right:-4px;
}
#BloggerSpiceCarouselSlider .container {
position:absolute;
top:0;
left:0;
margin:5px 0 0 5px;
width:300%;
height:120px;
}
#BloggerSpiceCarouselSlider figure {
display:block;
background-color:white;
float:left;
width:150px;
height:120px;
margin:0 5px 0 0;
position:relative;
overflow:hidden;
}
#BloggerSpiceCarouselSlider figcaption {
display:block;
position:absolute;
right:0;
bottom:-50px;
left:0;
background-color:black;
font:italic normal 11px Arial,Sans-Serif;
color:white;
padding:4px 10px;
text-align:left;
opacity:.8;
}
#BloggerSpiceCarouselSlider figure img {
display:block;
border:none;
margin:0 0;
}


Step #5: And locate the </head> section in your Blogger template

Step #6: Finally copy following line of markup and paste it above </head>


<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script type='text/javascript'>//<![CDATA[
(function($) {
var config = {
itemMargins: 5 // Distance between the thumbnails
};
var $thumbnailScroller = $('#BloggerSpiceCarouselSlider'),
$container = $thumbnailScroller.find('.container'),
$item = $container.find('figure'),
item_length = $item.length,
item_width = $item.outerWidth(),
item_margin = config.itemMargins,
total_width = (item_width + item_margin) * item_length,
$window = $(window);
$thumbnailScroller.css('overflow', 'hidden');
$container.css('width', total_width);
// Auto caption builder & hover effect
$item.each(function(cap) {
if ($(this).children().attr('title')) {
cap = $(this).children().attr('title');
$(this).children().removeAttr('title');
$(this).append('<figcaption>' + cap + '</figcaption>');
}
}).hover(function() {
$(this).find('figcaption').stop().animate({
bottom: 0
}, 200);
}, function() {
$(this).find('figcaption').stop().animate({
bottom: -50
}, 200);
});
$window.on("resize", function() {
var o_l = $thumbnailScroller.offset().left,
t_w = $thumbnailScroller.width(),
c_w = total_width;
$thumbnailScroller.on("mousemove", function(e) {
if ($(this).width() < $container.width()) {
$container.css('left', -((e.pageX - o_l) * (c_w - t_w) / t_w));
}
});
}).trigger("resize");
})(jQuery);
//]]>
</script>


Step #7: And click "Save template” button from the Top.

Now create a new post from Blogger Dashboard and switch to "HTML" view from "Compose" view. And paste the below script and alter the image.After that switch to "Compose" view from "HTML" view publish your post now. It will work now.

<div id="BloggerSpiceCarouselSlider">
<div class="container">
<figure>
<a href="#" title="Title for Caption">
<img alt="" src="http://1.bp.blogspot.com/-EE_tp-P3r9A/UfYvm5HykII/AAAAAAAAEJY/NuTPF5nNasA/s1600/7.jpg" />
</a>
</figure>
<figure>
<a href="#" title="Title for Caption">
<img alt="" src="http://2.bp.blogspot.com/-bp70bq1oUmE/UfYvnxZrc-I/AAAAAAAAEJs/ESVCQ3EKimk/s1600/9.jpg" />
</a>
</figure>
<figure>
<a href="#" title="Title for Caption">
<img alt="" src="http://3.bp.blogspot.com/-cqHmDnU6IUo/UfYvkiKD-pI/AAAAAAAAEIs/6rNbrWl2n5U/s1600/10.jpg" />
</a>
</figure>
<figure>
<a href="#" title="Title for Caption">
<img alt="" src="http://4.bp.blogspot.com/-zneaAHQlNgI/UfYvnaCia6I/AAAAAAAAEJc/aKEJCLOExJA/s1600/8.jpg" />
</a>
</figure>
<figure>
<a href="#" title="Title for Caption">
<img alt="" src="http://3.bp.blogspot.com/-0l9Jf0vageQ/UfYvmpUuOKI/AAAAAAAAEJk/6412AvMPgJs/s1600/6.jpg" />
</a>
</figure>
<figure>
<a href="#" title="Title for Caption">
<img alt="" src="http://1.bp.blogspot.com/-oe6eNCRFrPs/UfYvlop75fI/AAAAAAAAEJE/atL7k6y5bpI/s1600/4.jpg" />
</a>
</figure>
<figure>
<a href="#" title="Title for Caption">
<img alt="" src="http://4.bp.blogspot.com/-a5Ek7XZxIyE/UfYvlUlOyxI/AAAAAAAAEJM/XyZzkVtklF4/s1600/3.jpg" />
</a>
</figure>
<figure>
<a href="#" title="Title for Caption2">
<img alt="" src="http://1.bp.blogspot.com/-xarVMAVA3YU/UfYvkhm4MCI/AAAAAAAAEIw/cehXZF6MeRw/s1600/2.jpg" />
</a>
</figure>
<figure>
<a href="#" title="Title for Caption">
<img alt="" src="http://4.bp.blogspot.com/-A6GKQkWlf4o/UfYvkYZjF0I/AAAAAAAAEIo/goOT3YD4D_Y/s1600/1.jpg" />
</a>
</figure>
</div>
</div>

Anonymous 8/14/2016

i will give it try .. thanks

Good. For any further help feel free to leave comment.

Facebook Group Community Disqus Channel Code ConverterHide Code Converter Show EmoticonHide Emoticon

Got questions? Ask ’em below! While we’re here, you might like to give any feedback about this Post, Your comment inspire us to continuous Improvement of This Blog and Contents. Your words are your own, so be nice and helpful if you can. Please, only use your REAL NAME, not your business name or keywords. Using business name or keywords instead of your real name will lead to the comment being deleted. Anonymous commenting is not allowed either. Limit the amount of links submitted in your comment. We accept clean XHTML in comments, but don't overdo it please.

Make sure you tick the Notify Me box below the comment form to be notified of follow up comments and replies. Thank you for commenting

Contact Form

Name

Email *

Message *