How can I remove the space between buttons in css menu

I am new to css and html5 and try to make my menu bar work correctly. This is a horizontal menu bar with a drop-down list function. Before I focused the menu bar, there were no spaces between the navigation buttons and the drop-down menu buttons. After centering, they now have a space between them, which is annoying, because when you go between them, especially on the drop-down, you lose the drop-down menu due to the space. Therefore, I am trying to remove the space (not the borders) between the buttons. Thank you so much for your help, here is the code:

CSS

  /* START NAV MENU */

  nav {
  background-color:#333333;
  height:40px;
  width:100%;
  }


  nav ul {
  font-family: Sonoma, Arial;
  font-size: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align:center;
  }

  nav ul li {
  display: inline-block;
  position: relative;

  }

  nav li ul { 
  display: none; 
  }

  nav ul li a {
  display: inline-block;
  text-decoration: none;
  background: #666666;
  color: #ffffff;  
  padding: 5px 20px 3px 15px;
  margin-left: 1px;
  white-space: nowrap;
  height:30px; /* Width and height of top-level nav items */
  width:90px;
  text-align:center;
  border-right: 3px solid black;
  border-left: 3px solid black;

  }

  nav ul li a:hover { 
  background: #999999; 
  }

  nav li:hover ul {
  display: block;
  position: absolute;
  height:30px;
  }

  nav li:hover li {
  float: none;
  font-size: 11px;

  }

  nav li:hover a { 
  background: #534635; 
  height:30px; /* Height of lower-level nav items is shorter than main level */
  }

  nav li:hover li a:hover { 
  background: #999999; 
  }

  nav ul li ul li a {
    text-align:left;
  }

  /* END NAV MENU */

HTML FOR NAV:

  <nav>
  <ul>
  <li><a href="/">Home</a></li>
  <li><a href="/about">About Us</a>
    <ul>
        <li><a href="/crew">Our Crew</a></li>
        <li><a href="/history">History</a></li>
        <li><a href="/vision">Vision</a></li>
    </ul>
  </li>
  <li><a href="/products">Services</a>
    <ul>
        <li><a href="/carpentry">Carpentry</a></li>
        <li><a href="/waterproof">Waterproofing</a></li>
        <li><a href="/concrete">Concrete</a></li>
        <li><a href="/masonry">Masonry</a></li>
        <li><a href="/prop">Property Maintenance</a></li>
        <li><a href="/metal">Metal Construction</a></li>
        <li><a href="/design">Interior Design</a></li>
        <li><a href="/demo">Demo & Salvage</a></li>
    </ul>
  </li>
  <li><a href="/services">Portfolio</a>
  </li>          
  <li><a href="/contact">Contact</a>
    <ul>
        <li><a href="/email">Via Email</a></li>
        <li><a href="/contact_form">Web Form</a></li>
        <li><a href="/pigeon">Carrier Pigeon</a></li>
    </ul>
  </li>
  </ul>
  </nav>

If you could explain what changes should happen and why he changes it, I would be very grateful for that!

+5
3

<li> : inline-block;

 nav ul li {
  float: left; 
  position: relative;

  }

width: of <ul> , <ul> margin: 0 auto; .

nav ul {
width: calculated-width
margin: 0 auto
}
+1

, , , .

http://css-tricks.com/fighting-the-space-between-inline-block-elements/ , </li> <li>.

:

</li> .

<li><a href="/crew">Our Crew</a>
<li><a href="/history">History</a>
<li><a href="/vision">Vision</a>

HTML5 .

,

<li><a href="/crew">Our Crew</a></li><li><a href="/history">History</a></li>
    <li><a href="/vision">Vision</a>

<li><a href="/crew">Our Crew</a></li><!--
--><li><a href="/history">History</a></li><!--
--><li><a href="/vision">Vision</a></li>

0

ul {
    font-size: 0;
}

a {
    margin-right: -4px;
}

, : 0 , , -.

+2

Use a negative value for the margin property

margin-right: negative val;
0
source

All Articles