From 55ce7f3abdc60ca469c6dc03118dc07610afd58c Mon Sep 17 00:00:00 2001 From: aaditagrawal <103925638+aaditagrawal@users.noreply.github.com> Date: Tue, 17 Sep 2024 15:09:25 +0530 Subject: [PATCH] Update script.js --- script.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/script.js b/script.js index fe1e890..f3b7ddc 100644 --- a/script.js +++ b/script.js @@ -7,6 +7,19 @@ const links = [ const linksContainer = document.getElementById("links-container"); +// Add CSS for mobile center alignment +const style = document.createElement("style"); +style.textContent = ` + @media (max-width: 768px) { + #links-container { + display: flex; + flex-direction: column; + align-items: center; + } + } +`; +document.head.appendChild(style); + links.forEach((link) => { const linkElement = document.createElement("a"); linkElement.href = link.href;