0

I'm trying to cover the top of my site with list items.

My list items are appearing like this:

enter image description here

And i don't know why this separation between them. They don't have any margin and padding.

Anyone knows why is this?

HTML:

        <ul class="listras-lista">
            <li class="listras-lista_item"></li>
            <li class="listras-lista_item"></li>
            <li class="listras-lista_item"></li>
            <li class="listras-lista_item"></li>
            <li class="listras-lista_item"></li>
            <li class="listras-lista_item"></li>
        </ul>

CSS:

.listras-lista {
  list-style: none;
  width: 100%;
}
.listras-lista_item {
  display: inline-block;
  background: #CC00CC;
  width: 20%;
  height: 5px;
  padding: 0;
}
Hashem Qolami
  • 97,268
  • 26
  • 150
  • 164

2 Answers2

0

It's whitespace that causes the spaces. If you can, change the markup so that </li><li> are together

Francis Nepomuceno
  • 4,935
  • 4
  • 29
  • 35
0

This is caused by display: inline-block;. Change it to float:left;.