views:

38

answers:

1

Hi Guys,

I have a requirement by which I need to have something like below as the background of my asp.net menu item background. NOTE: The menu is populated by sitemapdatasource which is dynamic depending on querystring. alt text

I was doing some googling up and found that I can apply JQuery's rounded corner functionality along with asp.net menu item.

Has anyone got any better solution or probably an example of JQuery's rounded corner and asp.net menu item example.

Thanks,

Nimesh

+1  A: 

Another option is to use CSS instead. This works even when JavaScript is turned off.

Unless you can control the browser clients use you will need to use CSS3PIE to get it working with Internet Explorer though.

The CSS properties you need are -webkit-border-radius, -moz-border-radius, and border-radius. If you include all three, and set them to the same value, the vast majority of browsers will render the rounded corners for you.

Also, there will be no visual lag in the rounding as there is with JavaScript sometimes.

EDIT: The CSS selector will be basically the same as the JQuery one.

Justin
Hi Justin, I have used JQuery rounded corner and it works great on all browsers except IE where there is some noise on the corners (which can be neglected in my purpose). So it does the trick for me.
Nimesh
@Nimesh - Nothing wrong with JQuery. Thanks for accepting my answer.
Justin