I'm in the process of creating a navigation bar. Below is the code I have so far:
<nav class="menu">
<ul class="topnav">
<li><a href="index.html">Overview</a></li>
...
</ul>
</nav>
Within my CSS file, I've defined the styles for the li elements like this:
ul.topnav li{
cursor:pointer;
list-style-type:none;
display:inline;
float:left;
background-clip:padding-box;
text-align:center;
width:139px;
background-repeat:repeat-x;
background-image:url(images/nav_normal.png);
background-color:#CC33CC;
font-size:14px;
padding:9px 0 8px 0;
margin:0;
color:#6F5270;
text-shadow:#FCF 0 1px;
}
ul.topnav li a{
font-size:15px;
font-weight:bold;
padding:auto;
color:#FFFFFF;
text-shadow:#903 0 1px;
text-decoration:none;
}
This styling results in the following button being generated:
The issue I'm facing is that the clickable area of the link (highlighted in blue above) does not cover the entire button surface. When clicking on the edges of the button, the link doesn't respond. I've attempted adjusting the padding value without success. Is there a simple and effective method to ensure that the link covers the entire button area, allowing it to function no matter where the user clicks?