Click here to Skip to main content
13,399,289 members (34,383 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


3 bookmarked
Posted 14 Jul 2010

Making the entire menu td clickable

, 14 Jul 2010
Rate this:
Please Sign up or sign in to vote.
By default, the asp:Menu generates menu items as hyperlinks. A user can navigate to a page by clicking on the text of the hyperlink. The text will not occupy the entire place for the td hence some part of the menu would not allow you to navigate to the required page.

To make the entire menu area clickable and allow user to navigate to required page on click over the menu item, this trick can be used. You need to apply the following CSS to StaticMenuItemStyle property of asp:Menu item.

<StaticMenuItemStyle CssClass="StaticMenuHeader" />

.StaticMenuHeader td a

This CSS actually makes the width of the internal hyperlink to 100% making the entire area clickable.


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


About the Author

Anuj Khadloya
Technical Lead Kale Consultants Ltd.
India India
No Biography provided

You may also be interested in...


Comments and Discussions

GeneralMy vote of 5 Pin
Hornwood50910-Sep-13 9:27
memberHornwood50910-Sep-13 9:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.180218.2 | Last Updated 14 Jul 2010
Article Copyright 2010 by Anuj Khadloya
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid