<style> #top{ display: inline; border: 1px solid white; padding : 0.5em; } .b{ border : 1px solid black; padding : 0.6em;width: 26%; } .a:hover{ border: 1px solid white; background-color :grey; padding: 0.5em; } </style>
<ul class="b"> <li class ="a" id="top"> home </li> | <li class ="a" id="top"> About us </li> | <li class ="a" id="top"> Blog </li> | </ul>