I want to make the links side to side in the header. I need help with the CSS part.
<body>
<nav>
<div >
<a href="index.php"><umg src="spaceship.png" alt="blogs logo"></a>
<ul>
<li><a href="index.php">Home</a></li>
<li><a href="discover.php">About us</a></li>
<li><a href="blog.php">Find Blogs</a></li>
<li><a href="signup.php">Sign up</a></li>
<li><a href="login.php">Login</a></li>
</ul>
</div>
</nav>
That is my HTML code
CodePudding user response:
Try this code
nav .wrapper{
display: flex;
justify-content: space-between;
}
nav ul{
display: flex;
}
CodePudding user response:
Maybe something like this??
.wrapper {
display:flex;
flex-direction:row;
justify-content:space-evenly;
width:100%;
height:40px;
background-color:black;
padding-top:10px;
}
.wrapper > a{
color:white;
text-decoration:none;
}
a:hover {
text-decoration:underline
}
<body>
<nav>
<div >
<a href="index.php"><img src="spaceship.png" alt="blogs logo"></a>
<a href="index.php">Home</a>
<a href="discover.php">About us</a>
<a href="blog.php">Find Blogs</a>
<a href="signup.php">Sign up</a>
<a href="login.php">Login</a>
</div>
</nav>
CodePudding user response:
It should contain http For example href="https://classroom.udacity.com/nanodegrees/nd004-1mac-v2/dashboard/overview"