I have added a snippet to show you where I got to below.
I do not understand why I have the following problem...
- The
home
element is inside theul
like the rest of the navigation bar elements. But why is the bottom two styles inside the CSS file is adjusting and applying styles to all other elements but nothome
?...
Can someone explain where I am going wrong.. so confused..
body {
margin-top: -15px;
margin-left: 0;
margin-right: 0;
font-family: "Arial", serif;
}
img{
height: 100px;
}
.nav {
background-color: rgb(0,44,68);
list-style: none;
text-align: center;
padding: 10px 0 2px 0;
}
.nav ul {
display: flex;
justify-content: space-around;
padding: 0;
align-items: center;
font-size: 20px;
font-family: Calendas-Plus;
}
.nav li{
list-style: none;
display: inline-block;
}
.nav a {
color: white;
text-decoration: none;
}
ul li {
display: inline-block;
padding: 0 10px;
}
ul li ~ li {
border-right: 1px solid white;
border-left: 1px solid white;
border-top: 1px solid white;
border-bottom: 1px solid white;
}
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>test</title>
<link rel="stylesheet" href="styling.css" type="text/css">
</head>
<body>
<div class="nav">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/">About</a></li>
<li><a href="/">Products</a></li>
<li><img src="logo.png"></li>
<li><a href="/">Services</a></li>
<li><a href="/">News</a></li>
<li><a href="/">Contact</a></li>
</ul>
</div>
</body>
<script src="app.js" charset="utf-8"></script>
</html>