fix nav overflow on mobile portrait
nav had no flex-wrap, so the brand + 3 links overflowed a phone-width viewport at the site's 150% base font size - Customers (last link) got clipped off-screen, only reachable by rotating to landscape. Nav now wraps, and below 430px the brand drops to its own line above the links.
This commit is contained in:
+17
-1
@@ -52,7 +52,8 @@ nav {
|
|||||||
background: var(--color-wood-dark);
|
background: var(--color-wood-dark);
|
||||||
padding: 0.75rem 1.5rem;
|
padding: 0.75rem 1.5rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 1.5rem;
|
flex-wrap: wrap;
|
||||||
|
gap: 0.75rem 1.5rem;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,6 +74,21 @@ nav a:hover {
|
|||||||
color: var(--color-wood-light);
|
color: var(--color-wood-light);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Below ~430px (a phone in portrait, at this site's 150% base font size)
|
||||||
|
the brand name alone can approach full width - drop it to its own line
|
||||||
|
above the links instead of letting the flex row overflow the viewport. */
|
||||||
|
@media (max-width: 430px) {
|
||||||
|
nav {
|
||||||
|
padding: 0.6rem 1rem;
|
||||||
|
gap: 0.5rem 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav a.brand {
|
||||||
|
flex-basis: 100%;
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
main {
|
main {
|
||||||
max-width: 960px;
|
max-width: 960px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
|||||||
Reference in New Issue
Block a user