Click here to Skip to main content
15,900,378 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
well, i have anchor tag in menu list item.

<ul>
    <li><a href="Home.aspx"></a></li>
</ul>


menu list properties:
height=50px;
width=100px;

anchor tag properties.
font-size=18px;


problem is, page only redirected when i click exactly on anchor tag. but my requirement is i want to redirect the link when we click any where in list menu(around the anchor tag).

Pls Help me.

What I have tried:

<ul>
             <li><a href="Home.aspx">Home</a></li>

             <li><a href="contact.aspx">Contact Us</a></li>

             <li><a href="about.aspx">About Us</a></li>
</ul>


Sample Html code.
Posted
Comments
ZurdoDev 19-Feb-18 9:39am    
Use the developer tools to see what is going on, but you probably just need to make your a tags be 100% width or something. They just aren't extending to fill in the li tag.

1 solution

Just give padding some pixel to a tag.Remove Height.if it's possible to remove width means remove that also

ul li a{
padding:10px 5px;
margin:0 5px;
}

Instead width just give float:left for li

ul li{
float:left

}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900