It is not showing the whole content of Nav bar in a single line
Well I know that it ain’t that complex still though it isn’t working
Where should I use the display inline tag
body {
background-color: rgb(48, 32, 32);
}
.nav {
background-color: rgb(46, 64, 80);
color: aquamarine;
opacity: 0.5;
height: auto;
/* display: inline; */
text-align: center;
}
ul {
display: inline;
/* margin: auto; */
}
ul :hover {
background-color: brown;
color: aquamarine;
animation: forwards;
}
li {
font-size: 8vh;
}
<body>
<header>
<div class="nav">
<nav>
<ul>
<div class="link">
<a href="https://open.spotify.com/playlist/2BYJgVZQoFN2oQwuBCOIm6" target="_blank">
<img src="sth.jpg" alt="somethin" width="5%">
</a>
</div>
<li>»Home</li>
<li>»About</li>
<li>»Contact</li>
</ul>
</nav>
</div>
</header>
</body>
Can you please point out where is the mistake?
2
Answers
You just need to add "display: inline;" to your css li to get them to display inline, as well as add your image to a line item and display it as inline-block.
https://jsfiddle.net/jasonbruce/knsd40mz/10/
add
display:flex
in younav