I have successfully integrated a countdown timer into my website, utilizing the following HTML code:
<div id="clockdiv">
<div>
<span class="days"></span>
<div class="smalltext">Days</div>
</div>
<div>
<span class="hours"></span>
<div class="smalltext">Hours</div>
</div>
<div>
<span class="minutes"></span>
<div class="smalltext">Minutes</div>
</div>
<div>
<span class="seconds"></span>
<div class="smalltext">Seconds</div>
</div>
</div>
For further reference and demonstration, visit: https://codepen.io/Darlton29/pen/OJNzXEB
The challenge I am facing is creating a responsive design for mobile devices. I want the 4 time blocks to form a cube layout, stacked in pairs of 2 with even spacing. While I've made progress with one block, achieving the same for the others while maintaining consistency has proven difficult. My coding structure relies on Bootstrap 4.
CSS:
#clockdiv{
font-family: sans-serif;
color: #fff;
display: inline-block;
font-weight: 100;
text-align: center;
font-size: 30px;
}
#clockdiv > div{
padding: 10px;
border-radius: 3px;
background: #00BF96;
display: inline-block;
}
#clockdiv div > span{
padding: 15px;
padding-top: 10px;
padding-bottom: 10px;
border-radius: 3px;
background: #00816A;
display: inline-block;
}
.smalltext{
padding-top: 2px;
padding-bottom: -10px;
font-size: 16px;
}