title: CSS - removing horizontal space in list menu using display: inline property
body: <p>I'm new to CSS and have a set target of learning &amp; publishing my website in CSS by the end of the month.</p>
  
  <p>My question:</p>
  
  <p>I'm trying to build a CSS horizontal menu with hover drop downs, however, when I use the <code>display: inline</code> property with <code>li</code> (list) items, I get horizontal spaces between the <code>li</code> (list) items in the bar. How do I remove this space?</p>
  
  <p>Here is the HTML:</p>
  
  <pre><code>&lt;div id="tabas_menu"&gt;
      &lt;ul&gt;
          &lt;li id="tabBut0" class="tabBut"&gt;Overview&lt;/li&gt;
          &lt;li id="tabBut1" class="tabBut"&gt;Collar&lt;/li&gt;
          &lt;li id="tabBut2" class="tabBut"&gt;Sleeves&lt;/li&gt;
          &lt;li id="tabBut3" class="tabBut"&gt;Body&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And here is the CSS:</p>
  
  <pre><code>#tabas_menu {
      position: absolute;
      background: rgb(123,345,567);
      top: 110px;
      left: 200px;
  }
  
  ul#tabas_menu {
      padding: 0;
      margin: 0;
  }
  
  .tabBut {
      display: inline;
      white-space: 
      list-style: none;
      background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(255,142,190,1)),to(rgba(188,22,93,1)));
      background: -moz-linear-gradient(top, rgba(255,142,190,1), rgba(188,22,93,1));
      font-family: helvetica, calibri, sans-serif;
      font-size: 16px;
      font-weight: bold;
      line-height: 20px;
      text-shadow: 1px 1px 1px rgba(99,99,99,0.5);
      -moz-border-radius: 0.3em;
      -moz-box-shadow: 0px 0px 2px rgba(0,0,0,0.5);
      -webkit-border-radius: 0.3em;
      -webkit-box-shadow: 0px 0px 2px rgba(0,0,0,0.5);
      padding: 6px 18px;
      border: 1px solid rgba(0,0,0,0.4);
      margin: 0;
  }
  </code></pre>
  
  <p>I can get the space removed using the <code>float: left/right</code> property but it's bugging me as to why I cannot achieve the same effect by just using the display property. </p>