Style in cluttered list

Asked

Viewed 65 times

1

CSS

* {
    margin:0 auto;
}

ul {
    list-style:none;
    margin:0;
    padding:0;
}

.menuPrincpal {
}

.menuPrincipal li {
  display:inline;
}

.menuPrincipal li a {
  display:inline-block;
  vertical-align:middle;
  width:19.6%;
  height:50px;
  line-height:50px;
  text-align:center;
  font-size: 24px;
  color: rgb(223,189,92);
}

.menuPrincipal li a:hover {
  color: #FFF;
  background-color:rgb(223,189,92);
}

HTML

<ul class="menuPrincipal">
  <li>
    <a href="index.php">
      <img src="_img/_menuImgs/home.png"> Home      
    </a>
  </li>
  <li>
    <a href="catalogo.php">
      <img src="_img/_menuImgs/colecao.jpg"> Coleção      
    </a>
  </li>
  <li>
    <a href="contato.php">
      <img src="_img/_menuImgs/contato.png">Contato      
    </a>
  </li>
  <li>
    <a href="loja.php">
      <img src="_img/_menuImgs/loja.png"> Loja       
    </a>
  </li>
  <li>
    <a href="sobre.php">
      <img src="_img/_menuImgs/sobre.png"> Sobre      
    </a>
  </li>
</ul>

The idea is to remove the spaces margim and padding of UL. And IS working when I do:

ul {
    list-style:none;
    margin:0;
    padding:0;
}

.menuPrincpal {
}

But when I do:

ul {
    list-style:none;
}

.menuPrincpal {
    margin:0;
    padding:0;
}

although the objeto with classe menuPrincpal be a UL, NAY works.

Because?

1 answer

0

Because you typed the class name in the wrong CSS:

.menuPrincpal

IS .menuPrincipal - the letter was missing i.

  • Please forgive me: tired! I looked at it several times and saw the 'i' there. Thank you!. I must delete the question?

  • Nor... Never mind! Quiet... Everyone goes through this at one time or another.

  • ok. Thank you then!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.