Skip to content

Commit

Permalink
responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
Haksham committed Jan 1, 2025
1 parent c7b2bc6 commit 99a506b
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ nav {
nav ul {
list-style: none;
padding: 0;
margin: 0;
}

nav ul li {
Expand Down Expand Up @@ -79,4 +80,37 @@ footer {
width: 100%;
bottom: 0;
z-index: 1000;
}

/* Responsive styles */
@media (max-width: 768px) {
nav ul li {
display: block;
margin: 5px 0;
}

table, th, td {
display: block;
width: 100%;
}

th, td {
text-align: right;
padding-left: 50%;
position: relative;
}

th::before, td::before {
content: attr(data-label);
position: absolute;
left: 0;
width: 50%;
padding-left: 10px;
font-weight: bold;
text-align: left;
}

th, td {
padding: 10px 5px;
}
}

0 comments on commit 99a506b

Please sign in to comment.