• Facebook Rocks

    Go to Blogger edit html and replace these slide 1 description with your own words. ...

  • Facebook vs Twitter

    Go to Blogger edit html and replace these slide 2 description with your own words. ...

  • Facebook Marketing

    Go to Blogger edit html and replace these slide 3 description with your own words. ...

  • Facebook and Google

    Go to Blogger edit html and replace these slide 4 description with your own words. ...

  • Facebook Tips

    Go to Blogger edit html and replace these slide 5 description with your own words. ...

Showing posts with label Javascript. Show all posts
Showing posts with label Javascript. Show all posts

Create a message box for blogspot






Creating one small box for the blog to inform one event or one problem that the blog seems quite necessary for the blog. Yes it will not have to write really one to post a message (event if it does not need to use 1 post to inform). Instead, we only need to show one small text.


Can one of you please code your message, I was ok. And another one is not familiar with the view of your code should be required to share the code of this message box. Today my write must first article to share it.


Some information about this small message box: 
- Shows a lot of notice. 
Notifications will display random (random) after each page load. 
- There button to close the message.

Illustrations from his blog:


- In order to select a reasonable position, I recommend that you put this message box in the header of the blog. 
- After determining the location of the message box, you create one widget HTML / Javascript and paste the code inside as in:
<style type="text/css"> 
# thbao { 
padding: 6px 0; 
border-bottom: 1px solid # e6dac3; 
} collection 

# thbao-margin {margin: 0 auto;} 
. thbao-container { 
width: 705px; 
border : 1px solid # f2b768; 
padding: 4px; 
font-size: 90%; 
} 
. thbao-header { 
background: # ff6734; 
color: white; 
border: 1px solid # ffa789; 
padding: 5px 10px; 
white-space: nowrap; 
} 
. thbao-body { 
background: # fae9c8; 
padding: 5px 10px; 
width: 99%; 
} 
. thbao-close { 
float: right; 
margin-right:-5px; 
} 
</ style> 

<script language = "JavaScript" > 
function hideitem () { 
document.getElementById ("thbao"). style.display = "no ne"; 
} 
/ / <! [CDATA [ 
thbao = new Array (3); 
thbao [0] = '{Content first notice 1} '; 
thbao [1] = '{Content the first message 2}'; 
thbao [2] = '{content the 3rd}'; 
thbao [3] = {Content the 4th message} '; 

tbindex = Math.floor (Math.random () * thbao.length); 
/ /]]> 
</ script> 

<div id="thbao"> 
<div id = "thbao-margin "class =" thbao-container "> 
<table cellspacing="0" cellpadding="0"> 
<tbody> 
<tr> 
<td class="thbao-header"> <b> Note </ b> </ td> 
<td class="thbao-body"> 
<a href="#" class="thbao-close" onclick="hideitem()"> <img src = "http://www.blogger.com/img/close . png "alt =" Close "/> </ a> 
<span class="thbao-text"> 

<script









- The first is to edit the CSS code: 
You can see the illustration below and then change the value of it to the appropriate message box with your blog, mainly to adjust the values color and size.


- Next is the correct javascript code: 
I see code like this:
thbao = new Array (3); 
thbao [0] = '{Content the first message 1}'; 
thbao [1] = 'Content {2} message'; 
thbao [2] = '{Home What the first message 3} '; 
thbao [3] = '{content the 4th}';



All content of the notice must be in single quotes. Display the message contents allows the use of HTML tags . Above is a sample code for 4 paragraphs message, if 5 you just add the code below:
thbao = new Array (4); 
thbao [0] = '{Content the first message 1}'; 
thbao [1] = 'Content {2} message'; 
thbao [2] = '{Home What the first message 3} '; 
thbao [3] = '{content the 4th}'; 
thbao [4] = '{Content 5th message}';



Thus completed. wish you success. 

Button like 4 in 1 turn out from the right for blogspot include (facebook, twitter, google+ and feed)


Today I guide you to add upgrades of old gadgets, it includes buttons like Facebook, twitter, google+ and feed
View detailed code here: http://home.kenhdaihoc.com/2012/05/n...-ben-phai.html


<style> img,a { border: 0; }
#on { visibility: visible; }
#off { visibility: hidden; }
#facebook_div { width: 196px; height: 340px; overflow: hidden; }

#twitter_div { width: 246px; height: 353px; overflow: hidden; }

#google_plus_div { width: 152px; height: 97px; overflow: hidden; margin-left: 50px; margin-top: 10px; } #knfeedburner_div { width: 300px; height: 97px; overflow: hidden; margin-top: 5px; margin-left: -4px; }

#kakinetwork_div { width: 300px; height: 97px; overflow: hidden; }/* right side style */

#facebook_right { z-index: 10005; border: 2px solid #3c95d9; background-color: #fff; width: 196px; height: 353px; position: fixed; right: -200px; }
 #facebook_right img { position: absolute; top: -2px; left: -35px; }
#facebook_right iframe { border: 0px solid #3c95d9; overflow: hidden; position: static; height: 360px; left: -2px; top: -3px; }

#twitter_right { z-index: 10004; border: 2px solid #6CC5FF; background-color: #6CC5FF; width: 246px; height: 353px; position: fixed; right: -250px; }

#twitter_right_img { position: absolute; top: -2px; left: -35px; border: 0; }

#google_plus_right { z-index: 10003; background-color: #F2F2F2; border: 2px solid #006ec9; border-top: 2px solid #0056a0; border-bottom: 2px solid #0056a0; border-right: 2px solid #0056a0; border-left: hidden; width: 152px; height: 97px; position: fixed; right: -154px; }

#google_plus_right_img { position: absolute; top: -2px; left: -33px; border: 0; }

 #feedburner_right { z-index: 10003; background-color: #fefefe; border: 2px solid #5b5b5b; border-top: 2px solid #5b5b5b; border-bottom: 2px solid #5b5b5b; border-right: 2px solid #5b5b5b; border-left: hidden; width: 300px; height: 97px; position: fixed; right: -303px;

} #feedburner_right_img { position: absolute; top: -2px; left: -33px; border: 0; }

#kakinetwork_right { z-index: 10003; border: 2px solid #303030; background-color: #fff; width: 300px; height: 97px; position: fixed; }

#kakinetwork_right img { position: absolute; top: -2px; left: -101px; }/* left side style */

#facebook_left { z-index: 10005; border: 2px solid #3c95d9; background-color: #fff; width: 196px; height: 353px; position: fixed; left: -200px; }
#facebook_left img { position: absolute; top: -2px; right: -35px; }
#facebook_left iframe { border: 0px solid #3c95d9; overflow: hidden; position: static; height: 360px; right: -2px; top: -3px; }

#twitter_left { z-index: 10004; border: 2px solid #6CC5FF; background-color: #6CC5FF; width: 246px; height: 353px; position: fixed; left: -250px; }

#twitter_left_img { position: absolute; top: -2px; right: -35px; border: 0; }

#google_plus_left { z-index: 10003; background-color: #006ec9; border: 2px solid #006ec9; border-top: 2px solid #0056a0; border-bottom: 2px solid #0056a0; border-left: 2px solid #0056a0; border-right: hidden; width: 152px; height: 97px; position: fixed; left: -154px; }

 #google_plus_left_img { position: absolute; top: -2px; right: -33px; border: 0; }

 #feedburner_left { z-index: 10003; background-color: #fefefe; border: 2px solid #5b5b5b; border-top: 2px solid #5b5b5b; border-bottom: 2px solid #5b5b5b; border-left: 2px solid #5b5b5b; border-right: hidden; width: 300px; height: 97px; position: fixed; left: -303px; }

#feedburner_left_img { position: absolute; top: -2px; right: -33px; border: 0; }
#kakinetwork_left { z-index: 10003; border: 2px solid #303030; background-color: #fff; width: 300px; height: 97px; position: fixed; }
#kakinetwork_left img { position: absolute; top: -2px; right: -101px; }

.box-title1 { border: 1px solid #ddd; /*border-radius*/ -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; /*box-shadow*/ -webkit-box-shadow: 5px 5px 5px #CCCCCC; -moz-box-shadow: 5px 5px 5px #CCCCCC; box-shadow: 5px 5px 5px #CCCCCC; padding: 10px; margin: 10px 0; }

.enteryouremail { background: #fff !important; border: 1px solid #d2d2d2; padding: 0px 8px 0px 8px; color: #a19999; font-size: 12px; height: 25px; width: 165px; /*border-radius*/ -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; margin: 0px; }

 .submitbutton { background: #F2F2F2; border: 1px solid #F66303; /*box-shadow*/ -webkit-box-shadow: 3px 3px 3px #666; box-shadow: 3px 3px 3px #666; font: bold 12px Arial, sans-serif; color: #000000; height: 25px; padding: 0 12px 0 12px; margin: 0 0 0 5px; /*border-radius*/ -webkit-border-radius: 5px; border-radius: 5px; cursor: pointer; } </style>



<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js'></script>
<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>
<script type="text/javascript">jQuery(document).ready(function(){ jQuery("#facebook_right").hover(function(){ jQuery(this).stop(true,false).animate({right: 0}, 500); },function(){ jQuery("#facebook_right").stop(true,false).animate({right: -200}, 500); }); jQuery("#twitter_right").hover(function(){ jQuery(this).stop(true,false).animate({right: 0}, 500); },function(){ jQuery("#twitter_right").stop(true,false).animate({right: -250}, 500); }); jQuery("#google_plus_right").hover(function(){ jQuery(this).stop(true,false).animate({right: 0}, 500); },function(){ jQuery("#google_plus_right").stop(true,false).animate({right: -154}, 500); }); jQuery("#feedburner_right").hover(function(){ jQuery(this).stop(true,false).animate({right: 0}, 500); },function(){ jQuery("#feedburner_right").stop(true,false).animate({right: -303}, 500); }); });</script>

<div id="on"> <div id="facebook_right" style="top: 18%;"> <div id="facebook_div"> <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihpgML-WphAhkQE1I5zKimyk_6rWWT6Cxj2nqPTIvYcT1FSRYOPMt79MjXtE2i_HPN7H9VSadFobB45jCHIaXYNo27AxlaPfBwEBq7zzCmBr3mjZ3UC7ndV0cF7sQnYu5C3zUIQDc2FOk/s1600/helperblogger.com-facebook-icon.png" alt=""/> <iframe src="http://www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2Fpages%2FChiasekienthuc%2F158792620889846&amp;width=245&amp;colorscheme=light&amp;show_faces=true&amp;connections=9&amp;stream=false&amp;header=false&amp;height=270" scrolling="no" frameborder="0" scrolling="no" style="border: medium none; overflow: hidden; height: 270px; width: 245px;background:#fff;"></iframe> </div> </div> </div>

<div id="on"> <div id="twitter_right" style="top: 35%;"> <div id="twitter_div"> <img id="twitter_right_img" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9-ggusBiYsqkXsOos16iRT-F_DqKwOS0tITdzL8tw5D7BgaOx5HkS5iYoupkwIPADyFYtw87-7v5W3p8VXB_0P8YNv3DIu5InwvscGh6t3so0VhT6vQzyUUs4lmnNqPQoyUUPKBtgAK0/s1600/helperblogger.com-twitter-icon.png"/>

 <script src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>new TWTR.Widget({version: 2,type: 'profile',rpp: 4,interval: 1000,width: 246,height: 265,theme: {shell: {background: '#63BEFD',color: '#FFFFFF'},tweets: {background: '#FFFFFF',color: '#000000',links: '#47a61e'}},features: { loop: false,live: true,scrollbar: false,hashtags: false,timestamp: true,avatars: true,behavior: 'all' }}).render().setUser('traibavi2311').start();</script> </div> </div> </div>

<div id="on"> <div id="google_plus_right" style="top: 52%;"> <div id="google_plus_div"> <img id="google_plus_right_img" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigSlq-MwWzqlFzyv-gQM8PbHFW1SBnWfNObSeY_lHJ6SwLb2mXzgbbjH4cFTjdqi4DMql4hBLE9QoD8MrJIweLHvnWDLjhkFdW2tyUJB1J53HZAJXu9CuJ0PF1mwI6ZX9HDAezVP6enCo/s1600/helperblogger.com-google-plus-icon.png"/> <div style="float:left;margin:10px 10px 10px 0;"> <g:plusone size="tall" expr:href="data:post.url"></g:plusone> </div> </div> </div>

 <div id="on"> <div id="feedburner_right" style=" top: 69%;"> <div id="knfeedburner_div"> <center> <h4 style="color:#F66303;">You can also receive Free Email Updates:</h4>

<form action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=tin24h/sLdT', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true"> <input gtbfieldid="10" class="enteryouremail" name="email" value="Enter your email here..." onblur="if (this.value == '') {this.value = 'Enter your email here...';}" onfocus="if (this.value == 'Enter your email here...') {this.value = '';}" type="text"/><input value="kenhdaihoc" name="uri" type="hidden"/><input value="Submit" class="submitbutton" type="submit"/> </form>

</center><img id="feedburner_right_img" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGfA2EGw-UgJli4nMcF2WqN4z78dgE-S8g7OwHETM9IDKYQbFx9Uuu93_lG2ccYU83ubxSqNsN2IL9VfNGZUiCLMyfFdEHshnrURRp0nftQqo9AuOcrFqtamp191B8LQoJ9ogidUGKgik/s1600/helperblogger.com-subscribe-icon.png"/> </div> </div> </div> </div>














































Ctrl + F to find and edit the information below offline Note: I highlighted below you change your address with offline



  • kenhdaihoccom change the name of your facebook page
  • contact_kdh change with your Twitter account name
  • kenhdaihoc Change your feed ID.

Placing Adsense ads inside or between blog posts


How to add adsense ads inside Blogger blog posts or between blog posts:-
Adding adsense ads inside blog posts is a very good thing to do to increase your CTR.
CTR means"(the number of times your ad clicked) divided by (number of times it is shown).So,the more CTR you have,the more $$ you get.

As we know,there are more chances for the ads to be clicked when they are in the middle(blog posts) rather than at the sidebars(especially the right sidebar),footer,etc.So,


How to place adsense ads between Blog posts:

By doing this,the adsense units will be displayed between the blog posts in the homepage,archive pages and permalink(individual post pages).
Follow the procedure to do this:

1.Sign in to your blogger dashboard>click on the layout link

click on the layout link
2.Click on the Edit link in the "Blog Posts' column[look at the below screenshot]
click on Edit..............a pop up window opens..........
3.Check the box next to 'Show ads between Posts'

next,configure the ads,choose the format,colours,etc and SAVE THE CHANGES.configure the adsThat's it! Now your adsense ads will show between blog posts.

If you want to know how to add the adsense ads inside the blog post rather than between the post, follow this:-
Showing adsense ads inside Blogger blog Posts:-
1.Sign in to your blogger dashboard>layout>Edit html
Check the box next to 'Expand Widget Templates'


2.Scroll down the window till you see this code
<b:if cond='data:post.includeAd'> <data:adEnd/> <data:adCode/> <data:adStart/> </b:if>


3.Replace that code in the template with the below code
<b:if cond='data:blog.pageType != "item"'> <b:if cond='data:post.includeAd'> <data:adEnd/> <data:adCode/> <data:adStart/> </b:if> </b:if>

4.Again,scroll down the template and find out data-post body tag[look at the below screenshot]
and paste the below code just above that code{this will show ads above the post body}.If you want ads to show below the post,paste the code below that tag.
Here is the code to paste:-
<b:if cond='data:blog.pageType == "item"'> <b:if cond='data:post.includeAd'> <data:adEnd/> <data:adCode/> <data:adStart/> </b:if> </b:if>
That's it!
Leave you comments if you like the post or if you have any questions doubts.

Add Yellow And Red Warning Box CSS Style

Today I Designed Two Beautiful Red And Yellow Warning Boxes With The Use Of CSS. You Can Use This Codes To Display Warning Message Before Comments On Your Blog. 

So That User Not Left SPAM Comments And Saves Moderation Time. You Can Also Add This Code For Many Other Reasons.
  1. Login To Blogger Account.
  2. Click Blog Title → Template → Edit HTML.
  3. Click Proceed Button.
  4. Search For The Following Code Using Ctrl+F.
]]></b:skin>

   5.Add Any Of The Following Code Before Above Code.

Code For Red Box


#ErrorRed{ margin-left: 55px; background-image: url(http://lh3.googleusercontent.com/-SCexRoopeJw/UFsfPWIOXYI/AAAAAAAABPg/D4_aPGnQysI/s32/RedWarning.png); border: 1px solid #FF0F0F; background-color: #FFDEDE; border-radius:3px; font-size:15px; background-repeat:no-repeat; padding-left:40px; border-radius:9px; min-height:32px; width:auto; background-position:3px; margin:10px; padding-top:5px; color:#222; }

Code For Yellow Box


#ErrorYellow{ margin-left: 55px; background-image: url(http://lh6.googleusercontent.com/-STlIUwa6Dkg/UFsfPdrxhJI/AAAAAAAABPc/XNigxZmpvdE/s32/YellowWarning.png); border: 1px solid #FFCF0F; background-color: #FFFFDE; border-radius:3px; font-size:15px; background-repeat:no-repeat; padding-left:40px; border-radius:9px; min-height:32px; width:auto; background-position:3px; margin:10px; padding-top:5px; color:#222; }



  1. Save Your Template.
  2. Now In Post Or Template Where You Want To Display Text In Box
<div id="ErrorRed"> Text To Display In Red Box </div>
<div id="ErrorYellow"> Text To Display In Yellow Box </div>
Share Your Views 

How to Fix The Improper Blogger Comments Avatar Image

How to Fix The Improper Blogger Comments Avatar Image
This is a Quick Trick to Show the Blogger Comment Avatar Image Properly. I saw in many blogs Comments avatars. those are Improper in size. This is because of the CSS of both Default Comments System and Threaded Comments. which are present in your template and showing the avatar image improperly. here is the Quick Tip with css to Reset the Avatar image and Style the Image.

HOW TO FIX THE IMPROPER BLOGGER COMMENTS AVATAR IMAGE?

This is Reset CSS for Comment Avatar Image and is works for both Default Comment System and Threaded Comments System.
  1. Login to Blogger Dashboard > Choose your Blog and Click the More Options Dropdown
  2. Select the Template > Click on Edit HTML > Proceed
  3. Search for ]]></b:skin> and place the below code before it!
    .avatar-image-container,
    .avatar-image-container img{
    max-width:50px !important;
    width:50px !important;
    max-height:50px !important;
    height:50px !important;
    padding: 0 !important;
    border:0px;
    }
    Note: Default size it set to 50px. if you want Change the avatar size then simply modify the above CSS.

HOW TO ROUNDING THE BLOGGER COMMENT AVATAR IMAGE?

Rounding the Blogger Comment Avatar
In comment someone asked me to Rounding the Avatar image in blogger comments. here is the CSS for it!
this css will reset the avatar size to normal and rounds the Image.(so don’t use the above CSS) ;)
Search for ]]></b:skin> and place the below code before it!
.avatar-image-container,
.avatar-image-container img {
max-width: 50px !important;
width: 50px !important;
max-height: 50px !important;
height: 50px !important;
padding: 0 !important;
border: 0px;
-webkit-border-radius: 999px;
-moz-border-radius: 999px;
border-radius: 999px;
}


.avatar-image-container{
border:3px solid #fff !important;
-webkit-box-shadow: 0 1px 2px #BBB;
-moz-box-shadow: 0 1px 2px #BBB;
box-shadow: 0 1px 2px #BBB;
}
Note: Default size it set to 50px. if you want Change the avatar size then simply modify the above CSS.
If this post is helpful to you? then please share it! Thanks!.

Add Multi-Colored Popular Posts to Blogger

Popular Posts Widget is a widget provided by Blogger, showing the most viewed posts on the blog in the last 7 days, last month or of all time. It also has three displaying modes: display title only, display title with image thumbnail or display title along with the posts snippets.

To customize the popular posts widget, we must add a new variable and some css codes to our blogger template.

How to add multi-colored popular posts to Blogger

Step 1. Login to your Blogger Dashboard, go to Design >> Edit HTML >> check "expand widget templates" (make a backup first) and search for the following tag:

/* Variable definitions
   ====================

Step 2. Copy and paste just below/after this tag, the next code:

<Group description="PopularPosts Backgrounds" selector="#PopularPosts1">
<Variable name="PopularPosts.background.color1" description="background color1" type="color" default="#fa4242" value="#ff4c54"/>
<Variable name="PopularPosts.background.color2" description="background color2" type="color" default="#ee6107" value="#ff764c"/>
<Variable name="PopularPosts.background.color3" description="background color3" type="color" default="#f0f" value="#ffde4c"/>
<Variable name="PopularPosts.background.color4" description="background color4" type="color" default="#ff0" value="#c7f25f"/>
<Variable name="PopularPosts.background.color5" description="background color5" type="color" default="#0ff" value="#33c9f7"/>
</Group>

Step 3: Search for the following piece of code:

]]></b:skin>

Step 4. Just above/before it, add this code:

#PopularPosts1 ul{margin:0;padding:5px 0;list-style-type:none}
#PopularPosts1 ul li{position:relative;margin:5px 0;border:0;padding:10px}
#PopularPosts1 ul li:first-child{background:$(PopularPosts.background.color1);width:90%}
#PopularPosts1 ul li:first-child:after{content:"1"}
#PopularPosts1 ul li:first-child + li{background:$(PopularPosts.background.color2);width:85%}
#PopularPosts1 ul li:first-child + li:after{content:"2"}
#PopularPosts1 ul li:first-child + li + li{background:$(PopularPosts.background.color3);width:80%}
#PopularPosts1 ul li:first-child + li + li:after{content:"3"}
#PopularPosts1 ul li:first-child + li + li + li{background:$(PopularPosts.background.color4);width:75%}
#PopularPosts1 ul li:first-child + li + li + li:after{content:"4"}
#PopularPosts1 ul li:first-child + li + li + li + li{background:$(PopularPosts.background.color5);width:70%}
#PopularPosts1 ul li:first-child + li + li + li + li:after{content:"5"}
#PopularPosts1 ul li:first-child:after,#PopularPosts1 ul li:first-child + li:after,#PopularPosts1 ul li:first-child + li + li:after,#PopularPosts1 ul li:first-child + li + li + li:after,#PopularPosts1 ul li:first-child + li + li + li + li:after{position:absolute;top:20px;right:-15px;border-radius:50%;background:#353535;width:30px;height:30px;line-height:1em;text-align:center;font-size:28px;color:#fff}
#PopularPosts1 ul li .item-thumbnail{float:left;border:0;margin-right:10px;background:transparent;padding:0;width:40px;height:40px}
#PopularPosts1 ul li a{font-size:12px;color:#444;text-decoration:none}
#PopularPosts1 ul li a:hover{color:#222;text-decoration:none}

Step 5. Now find the following code:


<b:widget id='PopularPosts1' locked='false' title='Popular Posts' type='PopularPosts'>

Step 6. Delete it until you reach at this tag (delete this also):

</b:widget>

Note: Be very careful when removing it. The entire fragment of code should look like this:

<b:widget id='PopularPosts1' locked='false' title='Popular Posts' type='PopularPosts'>
<b:includable id='main'>
  <b:if cond='data:title'><h2><data:title/></h2></b:if>
  <div class='widget-content popular-posts'>
    <ul>
      <b:loop values='data:posts' var='post'>
      <li>
        <b:if cond='data:showThumbnails == &quot;false&quot;'>
          <b:if cond='data:showSnippets == &quot;false&quot;'>
            <!-- (1) No snippet/thumbnail -->
            <a expr:href='data:post.href'><data:post.title/></a>
          <b:else/>
            <!-- (2) Show only snippets -->
            <div class='item-title'><a expr:href='data:post.href'><data:post.title/></a></div>
            <div class='item-snippet'><data:post.snippet/></div>
          </b:if>
        <b:else/>
          <b:if cond='data:showSnippets == &quot;false&quot;'>
            <!-- (3) Show only thumbnails -->
            <div class='item-thumbnail-only'>
              <b:if cond='data:post.thumbnail'>
                <div class='item-thumbnail'>
                  <a expr:href='data:post.href' target='_blank'>
                    <img alt='' border='0' expr:height='data:thumbnailSize' expr:src='data:post.thumbnail' expr:width='data:thumbnailSize'/>
                  </a>
                </div>
              </b:if>
              <div class='item-title'><a expr:href='data:post.href'><data:post.title/></a></div>
            </div>
            <div style='clear: both;'/>
          <b:else/>
            <!-- (4) Show snippets and thumbnails -->
            <div class='item-content'>
              <b:if cond='data:post.thumbnail'>
                <div class='item-thumbnail'>
                  <a expr:href='data:post.href' target='_blank'>
                    <img alt='' border='0' expr:height='data:thumbnailSize' expr:src='data:post.thumbnail' expr:width='data:thumbnailSize'/>
                  </a>
                </div>
              </b:if>
              <div class='item-title'><a expr:href='data:post.href'><data:post.title/></a></div>
              <div class='item-snippet'><data:post.snippet/></div>
            </div>
            <div style='clear: both;'/>
          </b:if>
        </b:if>
      </li>
      </b:loop>
    </ul>
    <b:include name='quickedit'/>
  </div>
</b:includable>
</b:widget>

Step 7. After you have deleted the above code, paste this in its place:

<b:widget id='PopularPosts1' locked='false' title='Popular Posts' type='PopularPosts'>
<b:includable id='main'>
   <b:if cond='data:title'>
    <h2><data:title/></h2>
   </b:if>
   <div class='widget-content popular-posts'>
    <ul>
     <b:loop values='data:posts' var='post'>
      <li>
       <b:if cond='data:showThumbnails == &quot;false&quot;'>
        <b:if cond='data:showSnippets == &quot;false&quot;'>
         <a expr:href='data:post.href' expr:title='data:post.title' rel='bookmark'><data:post.title/></a>
        <b:else/>
         <a expr:href='data:post.href' expr:title='data:post.snippet' rel='bookmark'><data:post.title/></a>
        </b:if>
       <b:else/>
        <b:if cond='data:showSnippets == &quot;false&quot;'>
         <b:if cond='data:post.thumbnail'>
          <img class='item-thumbnail' expr:alt='data:post.title' expr:src='data:post.thumbnail'/>
         <b:else/>
          <img alt='no image' class='item-thumbnail' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguz2A1zSxIBPATn3OMg9p-DWO6_IERd0pjEwioImcUiJkHKlND4lDcQxDLhfAqnCiA2_2EyrPII_NYKhOQUNysi4X0IKwFqawF-der9oVsQv53gDQeqi9p-qvYpHJidoeTmc8Vx1QiSsQ/s1600/default.jpg'/>
         </b:if>
         <a expr:href='data:post.href' expr:title='data:post.title' rel='bookmark'><data:post.title/></a>
         <div class='clear'/>
        <b:else/>
         <b:if cond='data:post.thumbnail'>
          <img class='item-thumbnail' expr:alt='data:post.title' expr:src='data:post.thumbnail'/>
         <b:else/>
          <img alt='no image' class='item-thumbnail' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguz2A1zSxIBPATn3OMg9p-DWO6_IERd0pjEwioImcUiJkHKlND4lDcQxDLhfAqnCiA2_2EyrPII_NYKhOQUNysi4X0IKwFqawF-der9oVsQv53gDQeqi9p-qvYpHJidoeTmc8Vx1QiSsQ/s1600/default.jpg'/>
         </b:if>
         <a expr:href='data:post.href' expr:title='data:post.snippet' rel='bookmark'><data:post.title/></a>
         <div class='clear'/>
        </b:if>
       </b:if>
      </li>
     </b:loop>
    </ul>
   </div>
  </b:includable>
</b:widget>

Step 8. Save template.

Settings

- Go back to Design >> Page Elements and click on the edit link of Popular Posts widget.
Select to "display up to 5 posts", then Save the widget.

- You can easily change the background color of the popular posts widget, going to Design >>Template Designer >> Advanced >> PopularPostsBackground and there you can select any color you want.