Wednesday, November 20, 2024

How To Add Auto Image Slider In Blogger Homepage

 


Live Demo


Go to Blog Title → Layout → Add Widget → HTML/JavaScript. Add the below given code and Save it.

 

Now save the template so that changes can take place.

Settings

Search this tag and set your own.

img src="Add Your Image Link
h1 class="one"> = Add Your Header
p class="one"> = Add Your Description

Once you are done with the settings edit the code and Save the template again. Thats it, a cool sidebar slider can now be seen in your blogger blog.

Sunday, August 3, 2014

Friday, August 1, 2014

Automatic Numbering for Blogger Threaded Comments




For this tutorial to work you must be using threaded comments in your blogger templates. If you have not yet switched to that then please do so by reading the following tutorial:
  1. Go to blogger > template
  2. Backup your template
  3. Click Edit HTML
  4. Search for </b:skin>.  Click the black arrow to expand the code.
    5.  Paste the following Styles just above </b:skin>



  • /*----- Comment Counter by MBT -----*/
    .comment-thread ol {
    counter-reset: mbt-comments;
    }
    .comment-thread li:before {
    content:counter(mbt-comments);
    counter-increment: mbt-comments;
    font-size: 30px;
    float:left;
    position:relative;
    top:0px;
    left:-10px;
    margin-right:0px;
    height:100px;
    margin-right:0px;
    font-weight:bold;
    font-family:arial, georgia;
    color: #666;
    }
    .comment-thread ol ol {
    counter-reset: mbt-comments-sub;
    }
    .comment-thread li li:before {
    content: counter(mbt-comments) "." counter(mbt-comments-sub,lower-latin);
    counter-increment:mbt-comments-sub;
    font-size: 12px;
    color: #666;
    position:relative;
    top:10px;
    }

    .comments .comments-content .comment-header, .comments .comments-content .comment-content {  margin:0px 0px 8px 28px!important;} 


Customization:
  • You can adjust the font size and color of comment counts for Main section using the yellow highlighted regions
  • To edit the font size and color of sub sections (nested replies) change orange highlighted regions
  • lower-latin: Nested replies for first comment are counted in this order 1.a,  1.b,  1.c ... If you wish to display them in roman like 1.I, 1.II, 1.III, 1.IV... then replace lower-latin with Upper-roman,  if you wish to display them as integers then change it to decimal. Following are some other styles you can use for nested replies: lower-greek, circle, square, disc, lower-roman
       6.   Save your template and you are all done!
Visit your blog to see it working just fine! :)

Fancy Blogger Threaded Comments with Comment Counter!




Here we will override your default comment styles with our custom CSS code. We will customize almost everything from profile avatar images to reply and delete links. All I want from you is careful implementation of the easy steps below:
  1. Go To Blogger > Template
  2. Backup your template - You must keep a backup of your copy if incase you wanted to undo steps
  3. Search for this piece of code:
<b:includable id='threaded_comment_css'>
    Click the highlighted region to expand its code. You will now need to replace all the CSS code inside <style>   and </style>   with the following styles:


  •  /* Fancy Blogger Threaded Comments by MBT starts */                 .comment-thread ol {
                    counter-reset: mbt-comments;
    }
                .comment-thread li:before {
                content: &quot;\25C4&quot;counter(mbt-comments) &quot;\25BA&quot;;
                counter-increment: mbt-comments;
                font-size: 16px;
                position: relative;
                top: 100px;
                font-weight: bold;
                font-family: arial, georgia;
                color: rgb(199, 199, 199);
                left: -110px;
                padding: 4px 8px;
    }
                .comment-thread ol ol {
                counter-reset: mbt-comments-sub;
                  padding-top: 20px!important;
                  margin-bottom: 25px;
    }
                .comment-thread li li:before {
                content: counter(mbt-comments) &quot;.&quot; counter(mbt-comments-sub);
                counter-increment: mbt-comments-sub;
                font-size: 14px;
                position: relative;
                top: 100px;
                    left: -80px;
    }
                     
              .comments .comments-content .comment-thread ol ol {
                    padding: 0px 10px 40px 40px;
                    border: 1px solid #ddd;
                    box-shadow: 3px 4px 9px rgb(218, 218, 218);
                    margin-top: 10px;
                      }
                    .comments .comments-content .comment-thread ol ol li {
                        margin-bottom: -40px;
    }
                     
                      .comments {
                        clear: both;
                        margin-top: 10px;
                        margin-bottom: 0px;
                        line-height: 1em; border:0px !important;
                      }
                      .comments .comments-content {
                        font-size: 12px;
                        margin-bottom: 16px;
                        font-family: Verdana;
                        font-weight: normal;
                        text-align:left;
                        line-height: 1.4em;
                        width:88%; margin-left:70px;
                      }
                        .comment-form {
                        max-width: 100%;
                        clear: both;
    }
                     
                      .comments .comments-content .comment-thread ol li {
                        margin-top: -30px;
    }
                     
                     
                      .comments .comment .comment-actions a {
                     
                        cursor: pointer;
                        color: rgb(46, 46, 46);
                        padding: 2px 3px 2px 30px;
                        Position: RElative;
                        -moz-border-radius: 6px;
                        -webkit-border-radius: 6px;
                        border-radius: 6px;
                        font-family: &#39;Open Sans Condensed&#39;, sans-serif;
                        font-size: 12px;
                        font-weight: 700;
                        margin-right: 15px;
                        background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiffZz4e9JspsRHmRbo8lCK7S8k7E8RXzmbz0VrmrsMrPlvQuzbBfJIivHk1Ad-uZlyAgSp_hxe3ulKlJCuWDo2rGZ_TBE9Lq-TimHVE6GXcU7hk5WQARH6omz57HwO8n95fkhTrWNkF3c4/s1600/reply.png) no-repeat 9px 0px;
                        float:right;
                      }
                     
                    
                   
                     
                      .comments .comment .comment-actions a:hover {
                        text-decoration: underline;
                       
                      }
                      .comments .comments-content .comment-thread ol {
                        list-style-type: none;
                        padding: 0;
                        text-align: none;
                      }
                     
                      .comments .comments-content .comment-thread ol li {
                      border-bottom: 0px dashed rgb(196, 196, 196);
                        margin-bottom:25px
                      }
                     
                      .comments .comments-content .inline-thread {
                        padding: 0.5em 1em;
                      }
                      .comments .comments-content .comment-thread {
                        margin: 8px 0px;
                      }
                      .comments .comments-content .comment-thread:empty {
                        display: none;
                      }
                      .comments .comments-content .comment-replies {
                        margin-top: 1em;
                        margin-left: 40px;
                        font-size:12px;
                       
                      }
                      .comments .comments-content .comment {
                        margin-bottom:16px;
                        padding-bottom:8px;
                      }
                      .comments .comments-content .comment:first-child {
                        padding-top:16px;
                      }
                      .comments .comments-content .comment:last-child {
                        border:0px;
                        padding-bottom:0;
                      }
                      .comments .comments-content .comment-body {
                        position:relative;
                      }
                      .comments .comments-content .user {
                       
                        font-weight: 700;
                         font-size: 14px;
                        font-family: &#39;Open Sans Condensed&#39;, sans-serif;
                        color: #333!important;
                      }
                   
                     
                      .comments .comments-content .icon.blog-author{
                        position: absolute;
                        top: 52px;
                        right: -36px;
                        margin: 5px 0px 0px 0px !important;
                        background: url(&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFZE6_GPEbkN65NpBPTS4yxEGsTCL7GcjyQ-BxbxmEDbpjSE4W2oHSBFIPEwhSe1K8gr_rOXix-Tz8AkNq7j3cUEXaYyTRafWRBNZ_rqA74bQWaZaa5VmrQz5ifsZG24zYFZHH124TBuBS/s320/aDMIN.png&quot;) no-repeat scroll 0% 0% transparent;
                        width: 90px !important;
                        height: 90px !important; }
                     
                     
                      .comments .comments-content .datetime, .comments .comments-content .datetime a {
                        margin:0px;
                        display: block;
                        line-height: 30px!important;
                        font: italic 11px georgia;
                        width:180px;
                      }
                     
                      .comments .comments-content .datetime a {
                        text-decoration:none;
                      }
                      .comments .comments-content .comment-header
                      {
                        margin:0 0 15px 10px;
                      }
                     
                      .comments .comments-content .comment-content {
                        margin: 0 0 10px -50px;
                        }
                     
                      .comment-header a {
                        color:#333;
                      }
                     
                      .comment-header a:hover {
                        color:#666;
                      }
                     
                     
                      .comments .comments-content .comment-content {
                        text-align:justify;
                        text-align: justify;
                        font-family: &#39;Open Sans Condensed&#39;, sans-serif;
                        font-size: 13px;
                        border: 1px solid #ddd;
                        padding: 20px;
                      }
                      .comments .comments-content .owner-actions {
                        position:absolute;
                        right:0;
                        top:0;
                      }
                      .comments .comments-replybox {
                        border: none;
                        height: 250px;
                        width: 100%;
                      }
                      .comments .comment-replybox-single {
                        margin-top: 5px;
                        margin-left: 48px;
                      }
                      .comments .comment-replybox-thread {
                        margin-top: 5px;
                      }
                      .comments .comments-content .loadmore a {
                        display: block;
                        padding: 10px 16px;
                        text-align: center;
                      }
                      .comments .thread-toggle {
                        cursor: pointer;
                        display: inline-block;
                      }
                      .comments .continue {
                        cursor: pointer;
                      }
                      .comments .continue a {
                        display: none;
                        padding: 0.5em;
                        font-weight: bold;
                      }
                      .comments .comments-content .loadmore {
                        cursor: pointer;
                        max-height: 3em;
                        margin-top: 3em;
                      }
                      .comments .comments-content .loadmore.loaded {
                        max-height: 0px;
                        opacity: 0;
                        overflow: hidden;
                      }
                      .comments .thread-chrome.thread-collapsed {
                        display: none;
                      }
                      .comments .thread-toggle {
                        display: inline-block;
                      }
                      .comments .thread-toggle .thread-arrow {
                        display: inline-block;
                        height: 6px;
                        width: 7px;
                        overflow: visible;
                        margin: 0.3em;
                        padding-right: 4px;
                      }
                      .comments .thread-expanded .thread-arrow {
                        background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAG0lEQVR42mNgwAfKy8v/48I4FeA0AacVDFQBAP9wJkE/KhUMAAAAAElFTkSuQmCC&quot;) no-repeat scroll 0 0 transparent;
                      }
                      .comments .thread-collapsed .thread-arrow {
                        background: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAJUlEQVR42mNgAILy8vL/DLgASBKnApgkVgXIkhgKiNKJ005s4gDLbCZBiSxfygAAAABJRU5ErkJggg==&quot;) no-repeat scroll 0 0 transparent;
                      }
                      .comments .avatar-image-container {
                        float: left;
                        width: 36px;
                        max-height: 36px;
                        margin-top: 15px;
                        overflow: hidden;
                      }
                      .comments .avatar-image-container img {
                        width: 36px;
                         box-shadow: 2px 2px 0px rgba(0,0,0,0.13)
                      }
                      .comments .comment-block {
                        margin-left: 48px;
                        position: relative;
                      }
                     
                      .comments .comments-content .comment-replies {
                            margin-top: 3em;
                            margin-left: 40px;
                            font-size: 12px;
                                }
                     
                      .comments .comments-content .comment-replies a {
                        color: #333;
                            }
    /* For Animating Comment Header*/
    .trigger {
    margin-top: 3px;
    font-weight: bold;
    color: #A1A1A1;
    cursor: pointer;
    float: right;
    font-size: 12px;
    margin-right: 10px;
    }
    .triggeractive {
    color:rgb(255, 5, 5);
    }
    .toggle_container {
    overflow: hidden;
    clear: both;
    font-size: 12px;
    font-weight: normal;
    line-height: 20px;
    margin-top: 10px;
    }

                      
                      
                      /* Responsive styles. */
                      @media screen and (max-device-width: 480px) {
                        .comments .comments-content .comment-replies {
                          margin-left: 0;
                        }
                      }
    /* Fancy Blogger Threaded Comments by MBT  ENDS*/


     Make these Customizations:
    To be honest you will need to use browser inspector to fill up all the missing gaps in alignment and styling. Since every template is coded differently therefore there will be slight difference in how this Design appears on your blog. So use Chrome and its inspect element to perfect things.
  • The yellow highlighted parts represent the Hexadecimal code for the two arrows that surround the Comment Counter Number. You can change this if you know how to edit the content property else leave it default.
  • The brown highlighted code represents the icon next to reply and delete link. you can replace it with your own custom image link if you wish.
  • The green highlighted code represents the Admin Ribbon. You can change it also if you wish
  • Leave all other styles default because they will blend a light background very nicely unless your blog has a black background.
   
4. Next search for this #comments h4   and replace this CSS ID completely with this one:


  •  #comments h4{ color: #4E555A;
    font-size: 25px;
    font-family: 'Open Sans Condensed', sans-serif!important;
    line-height: 1.6em !important;
    font-weight: bold;
    margin: 20px 0 50px 0px;
    padding: 5px 0 5px 55px;
    background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsc3XoUTGJiXnNi_Nvr0bSQScpAGby43XKfZC5FFq9-mDoUEZjp5A7JQPTXHZX_QZgGWmLlgS6br5RMEPlqbRVHbU4X3PfjzgyYZcN-CYO6-LdpPQpz2DwXvGzTcRSOenq3HzfdFVwt6N-/s1600/mbt-postcomment.png) no-repeat 5px 10px;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.13);
    border: 2px dashed #DDD;
    border-radius: 4px;
    }


     5.  Save your template and you are half done!

Show Next & Previous Post Titles in Blogger with jQuery Navigation




First we will add the necessary code for the new pagination and then we will remove the existing default buttons that appear below comment section
  1. Go To Blogger > Template
  2. Backup your template
  3. Click "Edit HTML"
  4. Search for ]]></b:skin> 

  •  /*################MBT Pager ##########################*/
    .mbt-pager { border-top: 2px dashed #ddd; border-bottom: 2px dashed #ddd;  margin-bottom: 10px;   overflow:hidden; padding:0px;}
    .mbt-pager li.next { float: right; padding:0px; background:none; margin:0px;}
    .mbt-pager li.next a { padding-left: 24px; }
    .mbt-pager li.previous { margin:0px -2px 0px 0px; float: left;  border-right:1px solid #ddd; padding:0px; background:none;
    }
    .mbt-pager li.previous a { padding-right: 24px;  }
    .mbt-pager li.next:hover, .mbt-pager li.previous:hover  {background:#333333; }
    .mbt-pager li { width: 50%; display: inline; float: left; text-align: center; }
    .mbt-pager li a { position: relative; min-height: 77px; display: block; padding: 15px 46px 15px; outline:none; text-decoration:none;}
    .mbt-pager li i { color: #ccc; font-size: 18px; }
    .mbt-pager li a strong { display: block; font-size: 20px; color: #ccc; letter-spacing: 0.5px; font-weight: bold; text-transform: uppercase; font-family:oswald, sans-serif, arial; margin-bottom:10px;}
    .mbt-pager li a span { font-size: 15px; color: #666;  font-family:oswald,Helvetica, arial; margin:0px;}
    .mbt-pager li a:hover span,
    .mbt-pager li a:hover i { color: #ffffff; }
    .mbt-pager li.previous i { float:left; margin-top:15%; margin-left:5%; }
    .mbt-pager li.next i { float: right;
    margin-top: 15%;
    margin-right: 5%; }
    .mbt-pager li.next i, .mbt-pager li.previous i ,
    .mbt-pager li.next,  .mbt-pager li.previous{
    -webkit-transition-property: background color; -webkit-transition-duration: 0.4s; -webkit-transition-timing-function: ease-out;
    -moz-transition-property: background color; -moz-transition-duration: 0.4s; -moz-transition-timing-function: ease-out;
    -o-transition-property: background color; -o-transition-duration: 0.4s; -o-transition-timing-function: ease-out;
    transition-property: background color; transition-duration: 0.4s; transition-timing-function: ease-out; }
    .fa-chevron-right {padding-right:0px;}


    To change the black background and white font color of the selected area on mouse hover edit: background:#333333;    and for font color edit: color: #ffffff;
    Use our Color generator tool for picking the hexadecimal color code

      5. Now we will add some fancy Google web font called Oswald, so that our widget stands out. Kindly search for <head> and just below it paste the following code:


    •  <script src='http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js' type='text/javascript'/>
      <link href='http://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'/>


      Note: Remove the bolded code if you have already added jquery library inside your template.
           6. Next we will add the HTML code that will position the pager at the bottom of last paragraph on the blog post. Search for <data:post.body/>
           7. Just below it paste the following HTML code:


      •  
        <b:if cond='data:blog.pageType == &quot;item&quot;'>
        <b:if cond='data:blog.pageType != &quot;static_page&quot;'>
        <ul class='mbt-pager'>
                <li class='next'>
        <b:if cond='data:newerPageUrl'>
        <i class='fa fa-chevron-right'/><a class='newer-link' expr:href='data:newerPageUrl' expr:id='data:widget.instanceId + &quot;_blog-pager-newer-link&quot;' rel='next'/>
        <b:else/>
        <i class='fa fa-chevron-right'/><a rel='next'><strong>Next</strong> <span>You are viewing Most Recent Post</span></a>
        </b:if>
        </li>
            <li class='previous'>
        <b:if cond='data:olderPageUrl'>
        <i class='fa fa-chevron-left'/><a class='older-link' expr:href='data:olderPageUrl' expr:id='data:widget.instanceId + &quot;_blog-pager-older-link&quot;' rel='previous'/>
        <b:else/>
        <i class='fa fa-chevron-left'/><a rel='previous'><strong>Previous</strong> <span>You are viewing Last Post</span></a>
        </b:if>
        </li>
            </ul>

        <script type='text/javascript'>
        //<![CDATA[
        (function($){   
            var newerLink = $('a.newer-link');
            var olderLink = $('a.older-link');
            $.get(newerLink.attr('href'), function (data) {
             newerLink.html('<strong>Next</strong> <span>'+$(data).find('.post h3.post-title').text()+'</span>');   
            },"html");
            $.get(olderLink.attr('href'), function (data2) {
             olderLink.html('<strong>Previous</strong> <span>'+$(data2).find('.post h3.post-title').text()+'</span>');   
            },"html");
        })(jQuery);
        //]]>
        </script>
              </b:if></b:if>
       
     
    Here I used a bit of jquery to fetch the data inside title tags. Since blogger only provides the option to switch between next and previous posts using URLs, therefore we needed jQuery to find the title classes using the heading tags and retrieve the data out of them. The title classes and heading tags may be different for custom blogger templates (you may need my help here by posting your blog urls so that I could tell you the correct title class used inside your blog)
    In standard blogger templates the correct class is: .post h3.post-title   and therefore I will be using the same inside the jquery code above.
  • (Optional) The yellow and orange highlighted text can be replaced with any text you like. They will appear when a user is either viewing the most recent post or the last post on the blog.
8. Save your template and you are almost done! Visit your blogs and you will see the pager navigation working just perfectly! :)

Removing existing Next/Previous buttons

Now its time to prevent the default buttons from displaying below comment sections.
  1. Search for  <b:includable id='nextprev'>  
  2. You will see a big chunk of code below it that looks slightly similar to the code below: 

  •  <div class='blog-pager' id='blog-pager'>
       <b:if cond='data:newerPageUrl'>
         <span id='blog-pager-newer-link'>
         <a class='blog-pager-newer-link' expr:href='data:newerPageUrl' expr:id='data:widget.instanceId + &quot;_blog-pager-newer-link&quot;' expr:title='data:newerPageTitle'><data:newerPageTitle/></a>
         </span>
       </b:if>
       <b:if cond='data:olderPageUrl'>
         <span id='blog-pager-older-link'>
         <a class='blog-pager-older-link' expr:href='data:olderPageUrl' expr:id='data:widget.instanceId + &quot;_blog-pager-older-link&quot;' expr:title='data:olderPageTitle'><data:olderPageTitle/></a>
         </span>
       </b:if>
       <a class='home-link' expr:href='data:blog.homepageUrl'><data:homeMsg/></a>
       <b:if cond='data:mobileLinkUrl'>
         <div class='blog-mobile-link'>
           <a expr:href='data:mobileLinkUrl'><data:mobileLinkMsg/></a>
         </div>
       </b:if>
    </div>
    <div class='clear'/> 

   3. All that you need to do is to enclose this code inside conditional codes as shown below:


  •  
    <b:if cond='data:blog.pageType != &quot;item&quot;'>
    <b:if cond='data:blog.pageType != &quot;static_page&quot;'>

    THE ABOVE BIG CHUNK CODE IN
    </b:if></b:if>

        4. Save your template and you are all done!
    Now the default buttons will appear on homepage but not inside posts or static pages. If you wish to permanently delete them, then simply delete the big chunk code above and save your template.

Add Facebook Activity Feed Plugin To Blogger




Live Demo


The installation guide is kept extremely simple so just follow these easy steps:
  1. Go To Blogger > Template
  2. Backup your template
  3. click Edit HTML
  4. Optional step: If you have a Facebook comments plugin or Recommendations bar installed on your blog then you may skip to step#5 instead.
Search for the following tag inside your template:
<body>

or simply search for
<body

Just below this body tag paste the following JavaScript SDK code:
 
 
  •  <div id="fb-root"></div> 
        
    <script>(function(d, s, id) { 
    
        
      var js, fjs = d.getElementsByTagName(s)[0]; 
    
        
      if (d.getElementById(id)) return; 
    
        
      js = d.createElement(s); js.id = id; 
    
        
      js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; 
    
        
      fjs.parentNode.insertBefore(js, fjs); 
    
        
    }(document, 'script', 'facebook-jssdk'));</script>
     
     
     
    
      Save your template.
          5.  Next go to Blogger > Layout
          6. Click add a gadget and choose HTML/JavaScript widget
          7. Inside your HTML/JavaScript widget paste the following HTML5 code:



    •  <div class="fb-activity" data-site="http://www.MyBloggerTricks.com" data-width="300" data-height="450" data-border-color="#ffffff" data-header="false" data-recommendations="true"></div>



    Make these changes:
  • Replace http://www.MyBloggerTricks.com  with your website URL. For BlogSpot blogs it should have the following structure: http://your-blog-domain.blogspot.com
  • I have set width to 300 pixels (300)and height to 450 pixels (450). Adjust them according to your blog layouts only if alignment changes are required. Increase height if you want to display more stories inside the plugin.
  • In order to hide the blue border across the plugin, I have set the border to white. If your sidebar has a different colored background then adjust the background color by editing: #ffffff    Tip: Use our color generator tool
  • Friends likes appear above and recommended posts appear below that as bolded titles. If in case you don't want the plugin to display recommended stories then you can turn off recommendations by replacing true with false 
      8.  Save your widget and all done!
    Visit your blogs to see it working just fine. :)

Create a Custom Contact Form For Blogger - Part 2




Now you will need to create a Static Page where we will add the HTML code for our new contact form.
  1. Go To blogger > Pages
  2. Choose a Blank Page
  3. Give it any title you like. I recommend "Contact Us"
  4. Switch to its HTML mode and paste the following HTML code inside it: 


  •           <div class='form'>
    <!-- Custom Contact Form By MBT Starts -->
    <form name='contact-form'>
    <!-- Name Field -->
    <input class='contact-form-name' id='ContactForm1_contact-form-name' name='name' value="Name" size='30' type='text' onblur='if (this.value == &quot;&quot;) {this.value = &quot;Name&quot;;}' onfocus='if (this.value == &quot;Name&quot;) {this.value = &quot;&quot;;}' />
    <p></p>
    <!-- Email ID Field -->
    <input class='contact-form-email' id='ContactForm1_contact-form-email' name='email' value="Email ID"  size='30' type='text' onblur='if (this.value == &quot;&quot;) {this.value = &quot;Email ID&quot;;}' onfocus='if (this.value == &quot;Email ID&quot;) {this.value = &quot;&quot;;}'/>
    <p></p>
    <!-- Message Field -->
    <textarea class='contact-form-email-message'  id='ContactForm1_contact-form-email-message' name='email-message'  value='Leave Your Message..'  onblur='if (this.value == &quot;&quot;) {this.value = &quot;Leave Your Message..&quot;;}' onfocus='if (this.value == &quot;Leave Your Message..&quot;) {this.value = &quot;&quot;;}'></textarea>
    <p></p>
    <!-- Clear Button -->
    <input class='contact-form-button contact-form-button-submit MBT-button-color' type='reset' value='Clear'/> 
    <!-- Send Button --> 
    <input class='contact-form-button contact-form-button-submit MBT-button-color' id='ContactForm1_contact-form-submit' type='button' value='Send'/>
    <p></p>
    <!-- Validation -->
    <div style='text-align: center; max-width: 222px; width: 100%'>
    <p class='contact-form-error-message' id='ContactForm1_contact-form-error-message'></p>
    <p class='contact-form-success-message' id='ContactForm1_contact-form-success-message'></p>
    </div>
    </form>
    <!-- Custom Contact Form By MBT Ends -->
    </div>

    5.  Don't switch to Compose Mode of your Blogger Editor else the code will get messed up due to your Editor settings. Save and Publish your Page.
       Now if you visit your contact page you will see the default contact form with blue button. Its time to customize its default styles.
    Customizing The Form:
  1. Go To Blogger > Template
  2. Backup your Template
  3. Click "Edit HTML"
  4. Update: Search for </head>  and just above it paste the following CSS code:


  •  <style>
    /*---- Compatible contact Form by MBT -----*/
    .contact-form-name, .contact-form-email, .contact-form-email-message {
    max-width: 220px;
    width: 100%;
    font-weight:bold;
    }
         
    .contact-form-name {
    background: #FFF url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlcF7zBvQsSCiHg6QyjaxgbPCVkKqHJHUOAO-l7qkWr-XVHggPZv6A_hK6_iXctSpuWvbJEccVjPEWHcsVF4CPXhDimDohycLOw_-Bzq036oqhe76h0X4NTsmLHdVorYt-HOaL3P6aoOU/s320/name.png) no-repeat 7px 8px;
    background-color: #FFF;
    border: 1px solid #ddd;
    box-sizing: border-box;
    color: #A0A0A0;
    display: inline-block;
    font-family: Arial,sans-serif;
    font-size: 12px;
    font-weight:bold;
    height: 24px;
    margin: 0;
    margin-top: 5px;
    padding: 5px 15px 5px 28px;
    vertical-align: top;
    }
         
    .contact-form-email {
    background: #FFF url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7mkt0Seh-YmqjzQaVIp7JTFu68s6OjaFeUh0K1y4ERpG8uEhvwUgMPUNyy1MBrhoR9RaYVq7NUFl1TQt2pudorcA_urfUfQPTkjJuQLPAKG0EPU-Qf-6WTlVV-ZBT_QyuNpPl0X4L6AA/s320/email.png) no-repeat 7px 10px;
    background-color: #FFF;
    border: 1px solid #ddd;
    box-sizing: border-box;
    color: #A0A0A0;
    display: inline-block;
    font-family: Arial,sans-serif;
    font-size: 12px;
    font-weight:bold;
    height: 24px;
    margin: 0;
    margin-top: 5px;
    padding: 5px 15px 5px 28px;
    vertical-align: top;
    }

    .contact-form-email:hover, .contact-form-name:hover{
    border: 1px solid #bebebe;
    box-shadow: 0 1px 2px rgba(5, 95, 255, .1);

    padding: 5px 15px 5px 28px;
    }
    .contact-form-email-message:hover {
    border: 1px solid #bebebe;
    box-shadow: 0 1px 2px rgba(5, 95, 255, .1);
    padding: 10px;
    }
    .contact-form-email-message {
    background: #FFF;
    background-color: #FFF;
    border: 1px solid #ddd;
    box-sizing: border-box;
    color: #A0A0A0;
    display: inline-block;
    font-family: arial;
    font-size: 12px;
    margin: 0;
    margin-top: 5px;
    padding: 10px;
    vertical-align: top;
    max-width: 350px!important;
    height: 150px;
    border-radius:4px;
    }

    .contact-form-button {
    cursor:pointer;
    height: 32px;
    line-height: 28px;
    font-weight:bold;
    border:none;
    }

    .contact-form-button {
    display: inline-block;
    zoom: 1; /* zoom and *display = ie7 hack for display:inline-block */
    *display: inline;
    vertical-align: baseline;
    margin: 0 2px;
    outline: none;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    font: 14px/100% Arial, Helvetica, sans-serif;
    padding: .5em 2em .55em;
    text-shadow: 0 1px 1px rgba(0,0,0,.3);
    -webkit-border-radius: .5em;
    -moz-border-radius: .5em;
    border-radius: .5em;
    -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2);
    -moz-box-shadow: 0 1px 2px rgba(0,0,0,.2);
    box-shadow: 0 1px 2px rgba(0,0,0,.2);
    }
    .contact-form-button:hover {
    text-decoration: none;
    }
    .contact-form-button:active {
    position: relative;
    top: 1px;
    }

    .MBT-button-color {
    color: #fef4e9;
    border: solid 1px #da7c0c;
    background: #f78d1d;
    background: -webkit-gradient(linear, left top, left bottom, from(#faa51a), to(#f47a20));
    background: -moz-linear-gradient(top, #faa51a, #f47a20);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#faa51a', endColorstr='#f47a20');
    }
    .MBT-button-color:hover {
    background: #f47c20;
    background: -webkit-gradient(linear, left top, left bottom, from(#f88e11), to(#f06015));
    background: -moz-linear-gradient(top, #f88e11, #f06015);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f88e11', endColorstr='#f06015');
    border-color: #F47C20!important;
    }
    .MBT-button-color:active {
    color: #fcd3a5;
    background: -webkit-gradient(linear, left top, left bottom, from(#f47a20), to(#faa51a));
    background: -moz-linear-gradient(top, #f47a20, #faa51a);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f47a20', endColorstr='#faa51a');
    }
    </style>

          <!--[if IE 9]>
        <style>
       
    .contact-form-name {
    background: #FFF url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlcF7zBvQsSCiHg6QyjaxgbPCVkKqHJHUOAO-l7qkWr-XVHggPZv6A_hK6_iXctSpuWvbJEccVjPEWHcsVF4CPXhDimDohycLOw_-Bzq036oqhe76h0X4NTsmLHdVorYt-HOaL3P6aoOU/s320/name.png) no-repeat 7px 0px;
    }
    .contact-form-email {
    background: #FFF url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7mkt0Seh-YmqjzQaVIp7JTFu68s6OjaFeUh0K1y4ERpG8uEhvwUgMPUNyy1MBrhoR9RaYVq7NUFl1TQt2pudorcA_urfUfQPTkjJuQLPAKG0EPU-Qf-6WTlVV-ZBT_QyuNpPl0X4L6AA/s320/email.png) no-repeat 7px 6px;
    }
        </style>
        <![endif]-->
       
        <style>
    @media screen and (-webkit-min-device-pixel-ratio:0) {

    .contact-form-name {
    background: #FFF url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlcF7zBvQsSCiHg6QyjaxgbPCVkKqHJHUOAO-l7qkWr-XVHggPZv6A_hK6_iXctSpuWvbJEccVjPEWHcsVF4CPXhDimDohycLOw_-Bzq036oqhe76h0X4NTsmLHdVorYt-HOaL3P6aoOU/s320/name.png) no-repeat 7px 6px;
    padding: 15px 15px 15px 28px;

    }
    .contact-form-email {
    background: #FFF url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7mkt0Seh-YmqjzQaVIp7JTFu68s6OjaFeUh0K1y4ERpG8uEhvwUgMPUNyy1MBrhoR9RaYVq7NUFl1TQt2pudorcA_urfUfQPTkjJuQLPAKG0EPU-Qf-6WTlVV-ZBT_QyuNpPl0X4L6AA/s320/email.png) no-repeat 7px 8px;
    padding: 15px 15px 15px 28px;
    }

    .contact-form-email:hover, .contact-form-name:hover{
    padding: 15px 15px 15px 28px;
    }

    .contact-form-button {
    height: 28px;
    }
    }
    </style>



    The above Stylesheet will work just fine with all browsers including Internet Explorer. The code has been made compatible to work fine with all major browsers like IE, Mozilla and Webkit browsers.
  • To change button colors edit the class .MBT-button-color
  • To change the button color on mouse hover edit the class .MBT-button-color:hover  and for active mode edit .MBT-button-color:active

     5.  Save your template and you are all done!