From 3fcca255d6d7032cdcdb9078d419a1dde534305d Mon Sep 17 00:00:00 2001 From: yubraj977 Date: Wed, 15 Nov 2023 09:15:01 +0545 Subject: [PATCH] simple changes made here --- digital clock/digital.html | 4 +++- digital clock/main.js | 3 ++- digital clock/style.css | 27 ++++++++++++++++----------- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/digital clock/digital.html b/digital clock/digital.html index fd7d98d..fa8d379 100644 --- a/digital clock/digital.html +++ b/digital clock/digital.html @@ -16,7 +16,9 @@
-

00 00 00

+

+ +

diff --git a/digital clock/main.js b/digital clock/main.js index 251c65b..d3b6491 100644 --- a/digital clock/main.js +++ b/digital clock/main.js @@ -18,9 +18,10 @@ function updateClock(){ const minutes=String(now.getMinutes()).padStart(2,"0") const seconds=String(now.getSeconds()).padStart(2,"0") const millisec=String(now.getMilliseconds()).padStart(3,"0") + timestring=`${hours}:${minutes}:${seconds}` - updateElement.textContent=timestring + updateElement.innerText=timestring } updateClock(); setInterval(updateClock,200) diff --git a/digital clock/style.css b/digital clock/style.css index 5d6f479..547047d 100644 --- a/digital clock/style.css +++ b/digital clock/style.css @@ -13,29 +13,34 @@ .main{ width: 100%; height: 100vmin; - display: flex; + /* display: flex; justify-content: center; align-items: center; - overflow: hidden; + overflow: hidden; */ } strong{ - width: 100%; - display: flex; - justify-content: center; + text-align: center; } .time{ - + + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); font-size: 16rem; font-family: 'Technology', sans-serif; letter-spacing: 1.1rem; + min-width: 100px; /* Set your desired maximum width */ + margin: 0 auto; + + font-weight: bolder; + width: 1000px; + text-align: center; + + - margin: auto; - width: 758px; - padding-left: 60px; - /* text-align: center; */ - font-weight: bolder }