html - Navbar elements collapse to the row below after effects are added -


my navbar looked fine: link

<ul>      <li><a class="active" href="#home">home</a></li>      <li><a href="#news">news</a></li>      <li><a href="#contact">contact</a></li>      <li><a href="#about">about</a></li>    </ul> 

after adding hover effect, however, elements seem have gained invisible px right so: link

<ul>      <li><a class="active her-buzz-out" href=" #home">home</a></li>      <li><a class="her-buzz-out" href="#news">news</a></li>      <li><a class="her-buzz-out" href="#contact">contact</a></li>      <li><a class="her-buzz-out" href="#about">about</a></li>    </ul> 

they not fit anymore , attempt @ moving them right results in farthest element collapse row below... using absolute position not option because need relative. ideas on how make elements fit properly?

css in js fiddle page, unfortunately effects library on computer able describe error...

please give try!

ul {      list-style-type: none;      padding: 0;      overflow: hidden;      width: 265px;      height: 2.45em;      margin: 5em;      border-radius: 500px;      background-color: #4da6ff;  }    li {      float: left;  }    li {      position: relative;      top: 10px;      left: 1px;      color: #4da6ff;      text-decoration: none;      padding: 8.5px 11px;      margin-left:2px;      width: 40%;      border-radius: 500px;      background-color: #ffffff;    transition:all 400ms linear;  }    /* change link color #111 (black) on hover */  li a:hover {      background-color: #e6e6e6;      padding: 14px 20px;  }     .active {      background-color: #ffffff;      color: #4da6ff;  }  .out {      float: left;      width: 100%;      overflow: hidden;      height: 100px;  }  .out {      float: left;      max-width: 70px;      overflow: hidden;      height: 100px;      width: 100%;  }  li a:hover .out{        max-width: 70px;  }
<ul>       <li><div class="out"><a class="active her-buzz-out" href=" #home">home</a></div></li>       <li><div class="out"><a class="her-buzz-out" href="#news">news</a></div></li>       <li><div class="out"><a class="her-buzz-out" href="#contact">contact</a></div></li>       <li><div class="out"><a class="her-buzz-out" href="#about">about</a></div></li>     </ul>


Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -