I have this code The countdown is running ok but the problem is the text content in the new line display differently when the counting started. I want the text content and the timer display fixed. Please Help Thank you.
var countDownDate = new Date("December 25, 2018").getTime();
var x = setInterval(function() {
var now = new Date().getTime();
var distance = countDownDate - now;
var days = Math.floor(distance / (1000 * 60 * 60 * 24));
var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
var left = document.getElementById('time');
left.childNodes[0].textContent = " "+days + " " + hours + " "
+ minutes + " " + seconds + " ";
left.childNodes[1].textContent="Days"+"Hours"+"Minutes"+"Seconds";
if (distance < 0) {
clearInterval(x);
document.getElementById("left").innerHTML = "EXPIRED";
}
}, 1000);
#time #left{
color: black;
font-size: 70px;
margin-top: 10px;
}
#time #date{
color: #0000FF;
font-size: 90px;
margin-top: -28px;
}
<div id="time">
<p id="left"></p>
<p id="date"></p>
</div>
And i want this one to be the output: