Just joined this platform and I'm excited to post my first question here. Hopefully, I've done it correctly.
I'm currently following a YouTube course on DOM manipulation to create a Javascript stopwatch. You can find the course here.
I'm facing an issue with centering the starter zero's on my stopwatch and I just can't figure out why.
Any help or guidance would be greatly appreciated!
You can see how the tutors' version looks here and compare it with mine here
//My Markup//
<body>
<div class="container">
<div id="timer">00:00:00</div>
<div class="buttons">
<button id="startStopBtn">
<i class="fa-solid fa-play" id="play"></i>
</button>
<button id="resetBtn">
<i class="fa-solid fa-arrow-rotate-left" id="reset"></i>
</button>
</div>
</div>
//Their Markup://
<div class="container">
<div id="timer">
00:00:00
</div>
<div class="buttons">
<button id="startStopBtn">
<i class="fa-solid fa-play" id="play"></i>
</button>
<button id="resetBtn">
<i class="fa-solid fa-arrow-rotate-left" id="reset"></i>
</button>
</div>
//MY CSS://
body {
height: 100vh;
background: url(https://d1s9j44aio5gjs.cloudfront.net/2021/10/Underwater- empty-pool.jpg)
no-repeat center top / cover;
display: flex;
justify-content: center;
align-items: center;
}
.container {
width: 60%;
height: 250px;
background-color: #fff;
border-radius: 30px;
box-shadow: 0 0 3px;
}
#timer {
width: 100%;
font-size: 72px;
text-align: center;
margin: 0px auto;
padding: 35px;
}
.buttons {
text-align: center;
}
.button {
margin: 0 10px;
border: none;
}
button i {
font-size: 2rem;
padding: 10px;
color: #fff;
width: 50px;
}
#play {
background-color: green;
}
#pause {
background-color: orange;
}
#reset {
background-color: red;
}
//Their CSS//
body {
height: 100vh;
background: url(img/project-4.jpg) no-repeat center top / cover;
display: flex;
justify-content: center;
align-items: center;
}
.container {
width: 60%;
height: 250px;
background-color: #fff;
border-radius: 30px;
box-shadow: 0 0 3px;
}
#timer {
width: 100%;
font-size: 72px;
text-align: center;
margin: 0px auto;
padding: 35px;
}
.buttons {
text-align: center;
}
button {
margin: 0 10px;
border: none;
}
button i {
font-size: 2rem;
padding: 10px;
color: #fff;
width: 50px;
}
#play {
background-color: green;
}
#pause {
background-color: orange;
}
#reset {
background-color: red;
}