hi I have written css code to display menu bar. faced so many issues googled them and found solution too. But this one I couldn’t find.
This is chrome output which has gaps in betweens menu boxes but if firefox theres no issue at all. its contact. how do I solve this?
CSS
#candymenu li {
list-style-type: none;
display: inline-block;
width: 8.1em;
float: center;
text-align: center;
font-family: "Lucida Grande", sans-serif;
height: 3em;
}
#candymenu ul {
width: 100%;
margin:0 153px;
}
#candymenu li a {
display: inline-block;
margin 150px;
padding: .5em .5em .5em .5em;
text-decoration: none;
}
#candymenu li {
list-style-type: none;
display: inline-block;
width: 8.1em;
float: center;
text-align: center;
font-family: "Lucida Grande", sans-serif;
height: 3em;
border-right: 1px #818181 solid;
-webkit-box-shadow: 1px 1px #bbb;
box-shadow: 1px 1px 1px #bbb;
}
#candymenu li a {
display: inline-block;
padding: .8em .5em .5em .5em;
text-decoration: none;
color: #292929;
text-shadow: 1px 1px 1px #cccccc;
}
#candymenu li {
background-color: #c9c9c9;
background-image: -webkit-gradient(linear, left top, left bottom, from(#c9c9c9), to(#848484), color-stop(0.6, #a1a1a1));
}
#candymenu li:hover {
background-color: #dc3d73;
background-image: -webkit-gradient(linear, left top, left bottom, from(#dc3d73), to(#4c4c4c), color-stop(0.6, #474747));
}
#candymenu li:hover a {
color: #e8e8e8;
text-shadow: 1px 1px 0px #353535;
}
HTML
<div id="candymenu">
<ul>
<li id="home">
<a href="">Home</a></li>
<li id="Gaming">
<a href="">Gaming</a></li>
<li id="Reviews">
<a href="">Reviews</a></li>
<li id="News">
<a href="">news</a></li>
<li id="Interviews">
<a href="">interviews</a></li>
<li id="download">
<a href="">Download</a> </li>
<li id="support">
<a href="">Support</a></li>
<li id="candy">
<a href="">Candy</a></li>
<li id="events">
<a href="">Events</a></li>
</ul>
</div>
now how do i reduce that gap?
I think inline-block results in white-space dependent layout, which sucks.
So you basically need to place all your li-tags back to back, on one single line. Like so:
etc.
Let me know if it works out!