Actually, this is crazy, what you want to do is impossible in HTML and CSS only if you have already built the menu without any client side code
Looking at your previous posts it's pretty clear you are very new to ASP.net (How to insert values into a database for example you have asked for help with) so at risk of sounding rude are you expecting to be able to modify HTML code on the fly easily from aspx.cs codebehind, as it's not that easy. Is there a reason you don't want to use the ASP menu controls.

Cheers,
Joshua