Here I have my website: http://gyazo.com/56e069ebf8b5bd61ee30523886180b88
There are a number of issues with the nav bar.
You can see that the text or nav bar is not horizontally centered, as indicated by the hover (which is equal on top and bottom)
There is to much space in between the text, (and this spacing is the only way I've found works without the text moving around when highlighting or hovering.
The <.br> spacing on the drop down menu is too spaced apart.
So for 1. is there a way I can make the text or the nav bar (not sure what is the cause) centre so the hover looks more equal (horizontally)
For 2. Is there a way I can close the gap between the text, while still keeping the same padding settings, and so it doesn't move the text around when I use the hover function.
And 3. Is there a way to make the <.br> have half the space it currently uses
I've also added a jsfiddle if that helps: http://jsfiddle.net/d1a5eshs/
HTML code for the nav bar:
<!--TOP NAV BAR SECTION-->
<div id="nav_bar">
<ul>
<li><a href="index.html">HOME</a>
</li>
<li><a href="status.html">STATUS</a>
</li>
<li><a href="info.html">INFO</a>
</li>
<li><a href="#">GAMEMODES</a>
<ul>
<li><a href="survival.html">SURVIVAL</a>
</li>
<li><br><a href="pure-pvp.html">PURE-PVP</a>
</li>
<li><br><a href="gamesworld.html">GAMESWORLD</a>
</li>
</ul>
</li>
<li><a href="rules.html">RULES</a>
</li>
<li><a href="vote.html">VOTE</a>
</li>
<li><a href="contact.html">CONTACT</a>
</li>
</ul>
</div>
And the CSS for the nav bar:
/*TOP NAV BAR SECTION*/
#nav_bar {
background-color: #a22b2f;
padding:1px;
box-shadow: 0px 2px 10px;
height:45px;
}
#nav_bar ul li {
display: inline-block;
}
#nav_bar ul li a {
color: white;
text-decoration:none;
font-weight:bold;
font-size:15px;
margin-left:10px;
padding-bottom:13px;
padding-top:17px;
padding-left:10px;
padding-right:10px;
margin-bottom:30px;
}
#nav_bar ul li ul {
display: none;
}
#nav_bar>ul>li>a:hover {
background:#8c1b1f;
padding-bottom:13px;
padding-top:13px;
padding-left:10px;
padding-right:10px;
}
#nav_bar>ul>li>ul>li>a:hover {
background:#c9c9c9;
padding-bottom:5px;
padding-top:5px;
padding-left:5px;
padding-right:5px;
}
#nav_bar ul li:hover ul {
display: block;
position: absolute;
padding: 0px;
background: #e2e2e2;
padding-top:10px;
padding-bottom:10px;
padding-left:0px;
padding-right:10px;
border: 1px solid black;
border-radius:5px;
}
#nav_bar ul li:hover ul li {
display: block;
}
#nav_bar ul li:hover ul li a {
color: black;
font-size:12px;
font-weight:bol;
margin-left:-20px;
padding-bottom:5px;
padding-top:5px;
padding-left:5px;
padding-right:5px;
}
in your inner list. adjust line-height to get desired result – Sai Oct 24 '14 at 20:38