Reputation: 1818
I don't know why but if you run this code the left side of the nav bar is a bit bigger than the right can someone please tell me why? It doesn't look like I put any extra list items on the left. Thanks in advance.
<!DOCTPYE html>
<html>
<head>
<style>
html {
height: 100%;
width: 100%;
font: 25 calibri;
text-align: center;
background: linear-gradient(black,white);
}
#mainContent {
margin: 0 auto;
margin-top: -25px;
width: 800px;
background-color: white;
height: 1000px;
}
a:link, a:visited {
text-decoration: none;
color: grey;
}
a:hover {
color: #ccc;
}
li {
display: inline-block;
}
nav {
margin: 0 auto;
margin-top: 60px;
width: 720px;
background-color: brown;
text-align: center;
}
</style>
</head>
<body>
<nav>
<ul>
<li id="currentPage"><a href="index.html"><b>HOME</b></a></li>
<li>|</li>
<li><a href="updates.html">UPDATES</a></li>
<li>|</li>
<li><a href="tournaments.html">TOURNAMENTS</a></li>
<li>|</li>
<li><a href="recruitments.html">RECRUITMENTS</a></li>
<li>|</li>
<li><a href="contact.html">CONTACT</a></li>
</ul>
</nav>
<div id="mainContent">
</div>
</body>
</html>
Upvotes: 0
Views: 160
Reputation: 573
Use this style for your list
ul{
padding:0;
list-style-type:none;
}
Then check and let me know.
Upvotes: 2