Page Widget How to - Update background with round border for hover








Question

We would like to know how to update background with round border for hover.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
#menu li {<!--from  w  ww  .ja v a 2  s  . c om-->
  float: left;
}

#menu li a {
  color: #595959;
  font-size: 14px;
  font-weight: bold;
  position: relative;
  overflow: hidden;
  padding: 2px 5px;
  display: block;
}

#menu li a:hover {
  color: #FFFFFF;
  font-weight: normal;
  background-color: #e11d3b;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  border-radius: 5px;
  text-decoration: none;
  padding: 2px 5px 2px 6px;
}
</style>
</head>
<body>
  <ul id="menu">
    <li><a href="#.">Test1</a></li>
    <li><a href="#.">Test2</a></li>
  </ul>
</body>
</html>

The code above is rendered as follows: