Skip to content

Commit

Permalink
Use a more-standard list in the nav
Browse files Browse the repository at this point in the history
  • Loading branch information
tygern committed Nov 21, 2023
1 parent 3bda1ec commit 02771d6
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 34 deletions.
22 changes: 18 additions & 4 deletions css/menu.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
nav > * {
nav {
padding: 2rem 0;
}

nav ul {
display: flex;
flex-direction: column;

list-style: none;
padding: 0;
}

nav li {
margin: 0;
}

nav li a {
height: 2.5rem;
padding: 0 2rem;
display: flex;
Expand All @@ -10,10 +26,8 @@ nav h2 {
font-weight: 700;
text-transform: uppercase;
font-size: .9rem;
align-items: flex-end;
height: fit-content;
margin-top: 2rem;
margin-bottom: .25rem;
padding: 0 2rem;
}

nav a, nav a:visited {
Expand Down
75 changes: 45 additions & 30 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,38 +49,53 @@ <h1>CSS Starter</h1>
</header>
<nav>
<h2>Widgets</h2>
<a href="#">
<svg>
<use xlink:href="images/grid.svg#icon"></use>
</svg>
Dashboard
</a>
<a href="#">
<svg>
<use xlink:href="images/heart.svg#icon"></use>
</svg>
Favorites
</a>
<a href="#">
<svg>
<use xlink:href="images/plus.svg#icon"></use>
</svg>
Add
</a>
<ul>
<li>
<a href="#">
<svg>
<use xlink:href="images/grid.svg#icon"></use>
</svg>
Dashboard
</a>

</li>
<li>
<a href="#">
<svg>
<use xlink:href="images/heart.svg#icon"></use>
</svg>
Favorites
</a>
</li>
<li>
<a href="#">
<svg>
<use xlink:href="images/plus.svg#icon"></use>
</svg>
Add
</a>
</li>
</ul>

<h2>Profile</h2>
<a href="#">
<svg>
<use xlink:href="images/account.svg#icon"></use>
</svg>
Account
</a>
<a href="#">
<svg>
<use xlink:href="images/settings.svg#icon"></use>
</svg>
Settings
</a>
<ul>
<li>
<a href="#">
<svg>
<use xlink:href="images/account.svg#icon"></use>
</svg>
Account
</a>
</li>
<li>
<a href="#">
<svg>
<use xlink:href="images/settings.svg#icon"></use>
</svg>
Settings
</a>
</li>
</ul>
</nav>
<main>
<section id="typography">
Expand Down

0 comments on commit 02771d6

Please sign in to comment.