# Nav bar from hell

**URL:** <https://forum.codewithmosh.com/t/nav-bar-from-hell/16498>\
**Category:** HTML/CSS\
**Created:** [November 16, 2022, 2:31pm UTC](https://forum.codewithmosh.com/t/nav-bar-from-hell/16498 "2022-11-16T14:31:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rinne6paths](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@Rinne6paths](https://forum.codewithmosh.com/u/Rinne6paths)\
**Post date:** [November 16, 2022, 2:31pm UTC](https://forum.codewithmosh.com/t/nav-bar-from-hell/16498/1 "2022-11-16T14:31:50Z")

</div>

Im Having some difficulty creating a nav bar for this dummy site. To be honest im not even sure where to start. When i try to add the nav bar, my previous elements get pushed to the left and once i try to style the nav bar more it just disappears. Im not sure what to do at this point so any pointers would help. Thank you. below is my code.

Styling:  
@font-face {  
font-family: ‘exwayer’;  
src: url(/Fonts/exwayer-x3eqa-webfont.woff2) format(‘woff2’),  
url(/Fonts/exwayer-x3eqa-webfont.woff) format(‘woff’);  
font-weight: normal;  
font-style: normal;  
}

@font-face {  
font-family: ‘Future’;  
src: url(/Fonts/futurelight-bw15w-webfont.woff2) format(‘woff2’),  
url(/Fonts/futurelight-bw15w-webfont.woff) format(‘woff’);  
font-weight: normal;  
font-style: normal;

}

html {

font-size: 62.5%;

}

.runner {  
font-family:‘Future’;  
list-style-type: none;  
display: flex;  
color: white;  
box-sizing: border-box;

}

nav {

```
background: violet
height: 60px;  
width: 100%;

```

}

nav ul {

```
float: right;
margin-right: 20px;

```

}

nav ul li {  
display: inline-block;  
line-height: 80px;  
margin: 0 5px;  
}  
.edge {

```
background: url(/Images/—Pngtree—retro\ cyberpunk\ style\ 80s\ sci-fi_1177659.png);
background-size: 100% 100%;
background-repeat: no-repeat;
height: 100vh;
display: flex;
justify-content: center;

```

}

h1 {  
margin: 20px 0;  
font-family: ‘exwayer’;  
font-size: 7rem;  
font-weight: 900;  
text-transform: uppercase;  
color: white;  
text-shadow: 2px 2px 0 black;  
}

p {

```
font-family: 'Future';

```

}

.punk {

justify-content: center;  
align-items: center;

}

.cyber {

```
height: 100vh;
background-size: cover;
justify-content: center;
align-items: center;
color: #fff;
display: flex;
flex-direction: column;
text-align: center;

```

}  
.cyber .punk {

background: rgba(0, 0, 0, 0.6);  
font-size: 2rem;  
font-weight: 300;  
letter-spacing: 1.5px;  
padding: 1.5rem;  
}

 ![Screen Shot 2022-11-16 at 8.27.22 AM](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/d/d5cdcc07e1bbe210f38400852ed1a2590f8acf62.jpeg)

---

<div class="post-metadata">

**Author:** ![deeess](https://avatars.discourse-cdn.com/v4/letter/d/90ced4/32.png) [@deeess](https://forum.codewithmosh.com/u/deeess)\
**Post date:** [November 23, 2022, 2:28am UTC](https://forum.codewithmosh.com/t/nav-bar-from-hell/16498/2 "2022-11-23T02:28:22Z")

</div>

Please include the HTML as well

---

<div class="post-metadata">

**Author:** ![Rinne6paths](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@Rinne6paths](https://forum.codewithmosh.com/u/Rinne6paths)\
**Post date:** [December 2, 2022, 5:25pm UTC](https://forum.codewithmosh.com/t/nav-bar-from-hell/16498/3 "2022-12-02T17:25:03Z")

</div>

![Screen Shot 2022-12-02 at 11.24.31 AM](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/4/41390fcbee83367d06fda5f983e3ca85dc99362d.jpeg)

---

<div class="post-metadata">

**Author:** ![deeess](https://avatars.discourse-cdn.com/v4/letter/d/90ced4/32.png) [@deeess](https://forum.codewithmosh.com/u/deeess)\
**Post date:** [December 4, 2022, 10:14pm UTC](https://forum.codewithmosh.com/t/nav-bar-from-hell/16498/4 "2022-12-04T22:14:29Z")

</div>

This is because there is a flex on the entire body.

---

<div class="post-metadata">

**Author:** ![Rinne6paths](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@Rinne6paths](https://forum.codewithmosh.com/u/Rinne6paths)\
**Post date:** [December 7, 2022, 4:56pm UTC](https://forum.codewithmosh.com/t/nav-bar-from-hell/16498/5 "2022-12-07T16:56:19Z")

</div>

Thank you! so i should have flex on nav or just the Li elements?

---

<div class="post-metadata">

**Author:** ![deeess](https://avatars.discourse-cdn.com/v4/letter/d/90ced4/32.png) [@deeess](https://forum.codewithmosh.com/u/deeess)\
**Post date:** [December 7, 2022, 8:18pm UTC](https://forum.codewithmosh.com/t/nav-bar-from-hell/16498/6 "2022-12-07T20:18:00Z")

</div>

I’m not sure the exact design that you are trying to achieve.

> [@Rinne6paths](#):
>
> so i should have flex on nav or just the Li elements?

Did you try that?

---

<div class="post-metadata">

**Author:** ![Rinne6paths](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@Rinne6paths](https://forum.codewithmosh.com/u/Rinne6paths)\
**Post date:** [December 8, 2022, 4:11pm UTC](https://forum.codewithmosh.com/t/nav-bar-from-hell/16498/7 "2022-12-08T16:11:16Z")

</div>

I was just trying my hand at a basic navigation bar that resizes with the screen. i moved the flex element to the nav bar and it all reappeared correctly.
