Skip to content

Commit

Permalink
Update script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
aaditagrawal authored Sep 17, 2024
1 parent 2d2970f commit 55ce7f3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 55ce7f3

Please sign in to comment.