inkenya
  • Home
  • Marketing
    MarketingShow More
    How to Make Money Online in Kenya (2026 Guide for Beginners & Students)
    4 Min Read
    How to Create bundles mwitu new trick. Create free internet bundles
    4 Min Read
  • Resouce
    ResouceShow More
    How to Get Free Website Hosting in Kenya (No Payment Required)
    2 Min Read
    Yamaha psr-e443 styles free download
    2 Min Read
    Seben keyboard styles – Free seben beats download
    2 Min Read
    Download Seben Piano Beats for Yamaha PSR Keyboard (Lingala, Reggae & Worship Styles Pack)
    2 Min Read
    How to create keyboard piano beats styles-sty files. Yamaha psr style creator software.
    6 Min Read
  • Featured News
    Featured NewsShow More
    TOP 10 LIST OF KENYAN CELEBRITIES WHO CONFESSED LIVING WITH HIV/AIDS
    9 Min Read
    This is the guy who broke Akothee's virginity
    2 Min Read
    Toti – KTN Junior Actress leaked sex tape
    2 Min Read
    Akothe’s leaked sex tape gone viral, watch this video
    2 Min Read
    Robert Mugabe dead: Zimbabwe president ruled over period of land reform, hyperinflation.
    8 Min Read
  • Guide
    GuideShow More
    How to unlock dtv channels on smart tv
    3 Min Read
    How to add Scrolling News Headline in Blogger header
    12 Min Read
    How to add a beautiful chrismas countdown in blogspot.
    1 Min Read
    How to add Table Of Content (TOC) in blogger
    5 Min Read
    How to Add a Cookie Consent Popup in Blogspot (Easy Step-by-Step Guide 2026)
    3 Min Read
  • Contact
  • Blog
Reading: How to add a beautiful chrismas countdown in blogspot.
Share
Subscribe Now
inkenyainkenya
Font ResizerAa
  • Marketing
  • Resouce
  • Featured News
  • Guide
  • Complaint
  • Advertise
Search
  • Categories
    • Marketing
    • Resouce
    • Featured News
    • Guide
    • Lifestyle
    • Wellness
    • Healthy
    • Nutrition
  • More Foxiz
    • Blog Index
    • Complaint
    • Sitemap
    • Advertise
Follow US
Copyright © 2014-2023 Ruby Theme Ltd. All Rights Reserved.
Home » Blog » How to add a beautiful chrismas countdown in blogspot.
GuideUncategorized

How to add a beautiful chrismas countdown in blogspot.

Jarz
By Jarz
Last updated: April 19, 2026
1 Min Read
SHARE

 

Contents
Happy Holidays! This is an Examble of countdown HeadingAdd Christmas CountDown Timer Gadget To BlogspotWant to CountDown till New Year?

/***********************************************

* Dynamic Countdown script- © Dynamic Drive (http://www.dynamicdrive.com)

* This notice MUST stay intact for legal use

* Visit http://www.dynamicdrive.com/ for this script and 100s more.

***********************************************/

function cdtime(container, targetdate){

if (!document.getElementById || !document.getElementById(container)) return

this.container=document.getElementById(container)

this.currentTime=new Date()

this.targetdate=new Date(targetdate)

this.timesup=false

this.updateTime()

}

cdtime.prototype.updateTime=function(){

var thisobj=this

this.currentTime.setSeconds(this.currentTime.getSeconds()+1)

setTimeout(function(){thisobj.updateTime()}, 1000) //update time every second

}

cdtime.prototype.displaycountdown=function(baseunit, functionref){

this.baseunit=baseunit

this.formatresults=functionref

this.showresults()

}

cdtime.prototype.showresults=function(){

var thisobj=this

var timediff=(this.targetdate-this.currentTime)/1000 //difference btw target date and current date, in seconds

if (timediff"+arguments[0]+" days "+arguments[1]+" hours "+arguments[2]+" minutes "+arguments[3]+" seconds "

}

else{ //else if target date/time met

var displaystring="" //Don't display any text

alert("Christmas is here!") //Instead, perform a custom alert

}

return displaystring

}

How to add a beautiful chrismas countdown in blogspot.

Happy Holidays! This is an Examble of countdown Heading

It is easy to add a Christmas count down timer widget to blogger blog a christmass coundown is used to welcome your blog visitors or promote products sales on your blog.

This countdown timer widget counts down to 25 December 2022 and in military time format by counting days, hours, minutes and seconds left for the coming Christmas event.

The chrismass countdown widget also alerts and wishes Christmas by generating a pop-up once the count down ends. 

Read also: How to add download button in blogspot.

The JavaScript is provided by dynamic drive and it is customized and enhanced by MBT. This widget will be shared on each event here may it be EID, Holi or New Year. 

It is always a good idea to backup your theme or files when dealing with codes and scripts because any minor mistake might break your theme. You can hire us anyway for blog customization.


Add Christmas CountDown Timer Gadget To Blogspot

  1. Go To Blogger > Design
  2. Choose HTML/JavaScript widget
  3. Paste the following code inside it,

<style style="text/css">

.lcdstyle{ /*Example CSS to create LCD countdown look*/
background-color:fff;
color:#FF3333;
font: bold 20px arial;
padding: 15px;

border:5px solid #0080ff;

border-radius:15px;
-moz-border-radius:15px;
-webkit-border-radius:15px;
box-shadow: 5px 5px 5px #CCCCCC;


}

.lcdstyle sup{ /*Example CSS to create LCD countdown look*/
font-size: 120%
}

</style>

<script type="text/javascript">

/***********************************************
* Dynamic Countdown script- © Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

function cdtime(container, targetdate){
if (!document.getElementById || !document.getElementById(container)) return
this.container=document.getElementById(container)
this.currentTime=new Date()
this.targetdate=new Date(targetdate)
this.timesup=false
this.updateTime()
}

cdtime.prototype.updateTime=function(){
var thisobj=this
this.currentTime.setSeconds(this.currentTime.getSeconds()+1)
setTimeout(function(){thisobj.updateTime()}, 1000) //update time every second
}

cdtime.prototype.displaycountdown=function(baseunit, functionref){
this.baseunit=baseunit
this.formatresults=functionref
this.showresults()
}

cdtime.prototype.showresults=function(){
var thisobj=this


var timediff=(this.targetdate-this.currentTime)/1000 //difference btw target date and current date, in seconds
if (timediff<0){ //if time is up
this.timesup=true
this.container.innerHTML=this.formatresults()
return
}
var oneMinute=60 //minute unit in seconds
var oneHour=60*60 //hour unit in seconds
var oneDay=60*60*24 //day unit in seconds
var dayfield=Math.floor(timediff/oneDay)
var hourfield=Math.floor((timediff-dayfield*oneDay)/oneHour)
var minutefield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour)/oneMinute)
var secondfield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour-minutefield*oneMinute))
if (this.baseunit=="hours"){ //if base unit is hours, set "hourfield" to be topmost level
hourfield=dayfield*24+hourfield
dayfield="n/a"
}
else if (this.baseunit=="minutes"){ //if base unit is minutes, set "minutefield" to be topmost level
minutefield=dayfield*24*60+hourfield*60+minutefield
dayfield=hourfield="n/a"
}
else if (this.baseunit=="seconds"){ //if base unit is seconds, set "secondfield" to be topmost level
var secondfield=timediff
dayfield=hourfield=minutefield="n/a"
}
this.container.innerHTML=this.formatresults(dayfield, hourfield, minutefield, secondfield)
setTimeout(function(){thisobj.showresults()}, 1000) //update results every second
}

/////CUSTOM FORMAT OUTPUT FUNCTIONS BELOW//////////////////////////////

//Create your own custom format function to pass into cdtime.displaycountdown()
//Use arguments[0] to access "Days" left
//Use arguments[1] to access "Hours" left
//Use arguments[2] to access "Minutes" left
//Use arguments[3] to access "Seconds" left

//The values of these arguments may change depending on the "baseunit" parameter of cdtime.displaycountdown()
//For example, if "baseunit" is set to "hours", arguments[0] becomes meaningless and contains "n/a"
//For example, if "baseunit" is set to "minutes", arguments[0] and arguments[1] become meaningless etc


function formatresults(){
if (this.timesup==false){//if target date/time not yet met
var displaystring=arguments[0]+" days "+arguments[1]+" hours "+arguments[2]+" minutes "+arguments[3]+" seconds left until December 25, 2017 18:25:00"
}
else{ //else if target date/time met
var displaystring=""
}
return displaystring
}

function formatresults2(){
if (this.timesup==false){ //if target date/time not yet met
var displaystring="<span class='lcdstyle'>"+arguments[0]+" <sup>days</sup> "+arguments[1]+" <sup>hours</sup> "+arguments[2]+" <sup>minutes</sup> "+arguments[3]+" <sup>seconds</sup></span> "
}
else{ //else if target date/time met
var displaystring="" //Don't display any text
alert("Christmas is here!") //Instead, perform a custom alert
}
return displaystring
}

</script>


<h1 style="color:#0080ff; margin:0;">Happy Holidays!</h1>
<div id="countdowncontainer"></div>
<br />
<div id="countdowncontainer2"></div>

<script type="text/javascript">

var futuredate=new cdtime("countdowncontainer", "March 23, 2009 18:25:00")
futuredate.displaycountdown("days", formatresults)

var currentyear=new Date().getFullYear()
//dynamically get this Christmas' year value. If Christmas already passed, then year=current year+1
var thischristmasyear=(new Date().getMonth()>=11 && new Date().getDate()>25)? currentyear+1 : currentyear
var christmas=new cdtime("countdowncontainer2", "December 25, "+thischristmasyear+" 0:0:00")
christmas.displaycountdown("days", formatresults2)

</script>

 

Read Also: How to add table of contents in blogspot.

Make these changes to its colors and font if you wish:

  • To change the color of happy holidays edit color:#0080ff
  • To change the rounded blue border colour and size edit border:5px solid #0080ff
  • To change the Count Down text colour edit color:#FF3333

    4.   Save your widget and say bingo!

Visit your blogs to see it working just perfectly.

Want to CountDown till New Year?

Simply change December 25 to  December 31    and change Christmas is here! to HAPPY NEW YEAR FOLKS! 

If you know basic CSS then you add more flavour and color variation to it. I hope you may find this cool new widget worth using. If you wish to share it with your readers then kindly attach attributes to MBT and dynamic drive. Do let me know if you needed any further help.

Important: Hope you enjoyed our article on How to add a beautiful chrismas countdown in blogspot. Please if you found this post helpful you can rate us below or bookmark thus site for future posts. If you have problems adding chrismas countdown widget in your blogger please comment below and will freely help. Enjoy our other free blogger tricks you will surely LOVE!

var futuredate=new cdtime("countdowncontainer", "March 23, 2009 18:25:00")

futuredate.displaycountdown("days", formatresults)

var currentyear=new Date().getFullYear()

//dynamically get this Christmas' year value. If Christmas already passed, then year=current year+1

var thischristmasyear=(new Date().getMonth()>=11 && new Date().getDate()>25)? currentyear+1 : currentyear

var christmas=new cdtime("countdowncontainer2", "December 25, "+thischristmasyear+" 0:0:00")

christmas.displaycountdown("days", formatresults2)

TAGGED:add countdown clock in Blogger headerBlogger Christmas countdown timer widgetfestive countdown timer for Blogger blogfree Christmas countdown HTML widgetHow to add Christmas countdown in Blogspot

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
[mc4wp_form]
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Copy Link Print
Previous Article How to add Table Of Content (TOC) in blogger
Next Article How to add Scrolling News Headline in Blogger header
Leave a Comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

FacebookLike
XFollow
PinterestPin
InstagramFollow

Subscribe Now

Subscribe to our newsletter to get our newest articles instantly!
[mc4wp_form]
Most Popular
How to Start a Profitable Reseller Hosting Business in Kenya (2026 Guide)
May 1, 2026
How to Get Free Website Hosting in Kenya (No Payment Required)
April 16, 2026
How to Make Money Online in Kenya (2026 Guide for Beginners & Students)
April 16, 2026
[FREE DOWNLOAD] Kinemaster pro apk download (no watermark)
April 19, 2026
How to unlock dtv channels on smart tv
April 19, 2026

You Might Also Like

How to Unlock Password Protected PDF Files Safely (Step-by-Step Guide Without Losing Data 2026)

5 Min Read

Free Legit Paypal Money Adder tool. Add money to pay-pal accountWITHOUT SURVEYS

4 Min Read
Guide

How to Add a Download Button in Blogger Posts (Simple HTML Code Tutorial

2 Min Read

Home made pregnancy test with sugar, salt and toothpaste

7 Min Read

Always Stay Up to Date

Subscribe to our newsletter to get our newest articles instantly!
[mc4wp_form]
inkenya

We provide tips, tricks, and advice for improving websites and doing better search.

Latest News

  • SEO Audit Tool
  • Client ReferralsNew
  • Execution of SEO
  • Reporting Tool

Resouce

  • Google Search Console
  • Google Keyword Planner
  • Google OptimiseHot
  • SEO Spider

Get the Top 10 in Search!

Looking for a trustworthy service to optimize the company website?
Request a Quote
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?