I made a drop down menu using flex-box and everything works but for some reason the li
's display in a column instead fo a row by default. I even tried declaring it by using flex-driection: row;
but still nothing changed. The only part of the nav-bar i want to be a column is the sub-nav
content.
header {
border-color: #DC143C;
background-color: #DC143C;
padding-top: 15px;
padding-bottom: 15px;
margin: 0;
}
body {
background-color: black;
}
@font-face {
font-family: TransFormers;
src: url('../fonts/Transformers Movie.ttf') format('truetype');
}
.nav-bar {
background-color: #DC143C;
display: flex;
flex-wrap: wrap;
justify-content: space-around;
}
.nav-bar li {
position: relative;
margin: 5px 8px;
flex: 1;
}
.sub-nav {
display: none;
overflow: hidden;
margin-top: -13px;
font-size: .8em;
background: black;
}
li:hover>.sub-nav {
display: block;
}
.sub-nav li {
border-bottom: solid 1px #DC143C;
}
.nav-bar a {
border: 2px solid black;
background-color: black;
text-decoration: none;
flex: 1;
text-align: center;
padding: 10px;
color: #DC143C;
font-size: 2em;
font-weight: bold;
font-family: TransFormers;
display: flex;
flex-direction: row;
}
.nav-bar a:active {
text-decoration: underline !important;
}
.footer {
border-color: #DC143C;
background-color: #DC143C;
color: black;
}
<div id="container">
<header>
<nav role="navigation" class="nav-bar">
<ul class "nav-bar">
<li><a href="index.html" ;>Home</a></li>
<li><a href="#" ;>Shop</a>
<ul class="sub-nav">
<li><a href="shirts.html" ;>Shirts</a></li>
<li><a href="shirts.html" ;>Shirts</a></li>
<li><a href="shirts.html" ;>Shirts</a></li>
<li><a href="shirts.html" ;>Shirts</a></li>
</ul>
</li>
<li><a href="#archives" ;>Archives</a></li>
<li><a href="#suggestions" ;>Suggestions</a></li>
</ul>
</nav>
</header>
</div>