Home > database >  How to remove the selection of empty space in nav
How to remove the selection of empty space in nav

Time:07-19

How to remove the selection of empty space in nav i had use list style type none property.

See in the pic https://i.stack.imgur.com/abnkE.png

CodePudding user response:

put the padding of li padding:0px, and margin from left and right 5px; it should be work...!!!

ul {
  display: flex;
  list-style: none;
}

li {
  margin: 0px 5px;
  padding: 0px;
}
<nav>
  <ul>
    <li>Home</li>
    <li>About</li>
    <li>Contact</li>
    <li>Service</li>
    <li>Info</li>
  </ul>
</nav>

CodePudding user response:

Reset default styles by using reset CSS could be helpful. Add this line to head

<link href="https://cdnout.com/meyer-reset/reset.min.css" rel="stylesheet"/>
  • Related