Featured Posts can display your selected posts on your top of your Blogger blog. This widget has got hover effect too. You can add upto 4 featured posts in it.
So lets start
The tutorial is splitted into two parts, to make it easy to understand .
1. Adding CSS to Template:
- Goto Template → Edit HTML. Search for ]]></b:skin> ( PRESS Ctrl + F )
- Add the below following code just above ]]></b:skin>
#featured-post a{color:#fff}
#featured-post ul{list-style:none;padding:0}
#featured-post ul li{padding:2px 0 0 2px;float:left;clear:none;width:183px}
#featured-post .item-content{background:transparent}
#featured-post .item-thumbnail{background:transparent}
#featured-post .item-content img{width:183px;height:183px}
#featured-post .item-title{line-height:1.3em;font-size:90%;min-height:50px;max-height:50px;;opacity:0.75;background:#000;margin:-63px 0 1px;padding:5px;color:#fff;overflow:hidden}
#featured-post ul li:first-child{height:250px!important;width:250px!important;padding:2px 0 0!important}
#featured-post ul li:first-child img{height:250px!important;width:250px!important}
#featured-post ul li:first-child + li + li + li{width:368px!important;height:64px!important;overflow:hidden}
#featured-post ul li:first-child + li + li + li img{width:368px!important;height:368px!important}
#featured-post ul li:first-child + li + li + li div.item-title{margin:-373px 0 5px;padding-right:60px;min-height:56px;max-height:56px;opacity:0.90;background: #000 url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDQwYT20VTad0x8uKfHzAv1Q15Xu40vkRQY88rOT747WaItXihUZJR0ID3E1NFQy5-Q4n5M_3Fj6eArKIGZ8IJT0GipmuYVqqW33_smS-EAkzIcOtvKa02u4In4vfEZ2BQ-uFXAaUELYI/s48/Arrow%2520Right.png') 305px 7px no-repeat!important}
#featured-post ul li:first-child + li + li + li div.item-title a{font-size:16px;line-height:1.2em}
- Save the template.
2. Add Widget to your blog:
- Goto Layout → Add Widget → HTML/JavaScript. Add the below code and click Save.
<div id="featured-post">
<ul>
<!--Featured Post 1>
<li>
<div class="item-content">
<div class="item-thumbnail">
<a href="post url"><img src="image url" /> </a></div>
<div class="item-title">
<a href="post url">Post Title</a></div></div></li><!Featured Post 1 end-->
<!--Featured Post 2>
<li>
<div class="item-content">
<div class="item-thumbnail">
<a href="post url"><img src="image url" /> </a></div>
<div class="item-title">
<a href="post url">Post Title</a></div></div></li><!Featured Post 2 end-->
<!--Featured Post 3>
<li>
<div class="item-content">
<div class="item-thumbnail">
<a href="post url"><img src="image url" /> </a></div>
<div class="item-title">
<a href="post url">Post Title</a></div></div></li><!Featured Post 3 end-->
<!--Featured Post 4>
<li>
<div class="item-content">
<div class="item-thumbnail">
<a href="post url"><img src="image url" /> </a></div>
<div class="item-title">
<a href="post url">Post Title</a></div></div></li><!Featured Post 4 end-->
</ul>
- Replace post url, image url, and post title with your desired URL/Link/Name.
- Save the Template.
- You are done.
Note:
You can add 4 featured posts with the help of this widget. 3 will have images whereas one will have just the title .
.jpg)


0 comments:
Post a Comment