Skip to content

Commit 1f58676

Browse files
authored
Update nav.css
1 parent 6ed7400 commit 1f58676

File tree

1 file changed

+18
-20
lines changed

1 file changed

+18
-20
lines changed

assets/css/nav.css

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -52,44 +52,42 @@
5252
max-height: 50px;
5353
}
5454

55+
5556
/* Responsive design adjustments for mobile */
5657
@media print, screen and (max-width: 960px) {
5758
.topnav {
5859
flex-direction: column; /* Stacks items vertically */
5960
align-items: flex-start; /* Aligns items to the left */
6061
padding: 0; /* Removes all padding */
61-
margin: 0; /* Removes all margins */
62-
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Adds shadow */
62+
margin: 0; /* Removes all margin */
63+
margin-left:0;
64+
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Adds a shadow below the bar */
6365
width: 100%; /* Ensures full width */
6466
}
6567

68+
.topnav #myLinks {
69+
display: none; /* Hidden by default on mobile */
70+
}
71+
6672
.topnav a.icon {
73+
float: none;
6774
display: block; /* Shows the hamburger icon on mobile */
68-
font-size: 16px; /* Adjust font size */
69-
background-color: #808080; /* Background color for better visibility */
70-
color: #ffffff; /* White color for icon */
71-
padding: 8px; /* Adds padding for better touch area */
72-
margin: 0; /* Removes margin */
75+
font-size: 14px; /* Slightly smaller font size */
76+
background-color: #808080;
77+
color: #ffffff; /* White text for better contrast */
78+
padding: 6px 10px; /* Minimal padding for a thinner icon */
79+
margin: 0; /* Removes all margins */
80+
cursor: pointer;
7381
border-radius: 0; /* Removes rounded edges */
74-
align-self: stretch; /* Stretches to fill the container */
75-
box-sizing: border-box; /* Includes padding in width calculation */
76-
width: 50px; /* Sets a fixed width for the icon */
77-
}
78-
79-
.topnav #myLinks {
80-
display: none; /* Hidden by default on mobile */
81-
flex-direction: column; /* Stacks links vertically */
82-
width: 100%; /* Full width for mobile */
83-
background-color: #f0f0f0; /* Light grey background for the dropdown */
84-
margin: 0; /* Removes any margin */
85-
padding: 0; /* Removes any padding */
82+
align-self: flex-start; /* Aligns the icon to the left */
83+
width: 100%; /* Ensures full width for the icon */
8684
}
8785

8886
.topnav a.normal {
8987
display: block;
9088
width: 100%;
9189
text-align: left; /* Aligns links to the left */
92-
padding: 8px 10px; /* Reduced padding for thinner bar */
90+
padding: 8px 10px; /* Reduces padding for a thinner bar */
9391
background-color: #ffffff; /* White background for links */
9492
color: #808080; /* Grey text color for links */
9593
}

0 commit comments

Comments
 (0)