0

My navbar is based off an un-ordered list.

Each <li> is displayed as inline-block.

However I am unable to get rid of the white-space between the li's

nav-item li{
  width: 123px;
  height: 120px;
  display: inline-block;
  padding: 0;
  margin: 0;
}

I have researched this item on stackoverflow/google but haven't found an solution yet.

Plnkr here:

http://plnkr.co/edit/7irazgvxqkpCeurnQ0Yv
runtimeZero
  • 26,466
  • 27
  • 73
  • 126

3 Answers3

0

Change display: inline-block; to float: left;:

nav-item li{
      width: 123px;
      height: 120px;
      float: left;
      padding: 0;
      margin: 0;
}
TheOnlyError
  • 1,441
  • 12
  • 19
0

Remove the white space and line breaks in your HTML between the LIs.

<ul>
<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li><li>Aliquam tincidunt mauris eu risus.</li><li>Vestibulum auctor dapibus neque.</li>
</ul>
Scott Simpson
  • 3,832
  • 3
  • 27
  • 35
0

Add white-space: normal; to your nav-item class

.nav-item li{
  width: 123px;
  height: 120px;
  display: inline-block;
  padding: 0;
  margin: 0;
 white-space: normal;
}
Prime
  • 3,530
  • 5
  • 28
  • 47