Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Images in Horizonal Menu Control

Status
Not open for further replies.

djs45uk

Technical User
Nov 7, 2004
103
GB
I am using the Menu control to create a horizontal menu and I've seen a really great menu on the web. Is it possible to include images at the top and bottom of each dropdown list? I've circled in red what I mean:



Can you also use a background image when you rollover each item in the menu? For example:


If it makes any difference, I'm getting the menu items from an XML file.

Many thanks in advance

Daniel
 
Yes, you can do both questions that you asked. I imagine for the first question, you'd simply add menu items and set an image as the source for them (or even add you own Image control to them).

As for the second one, you could use the CSS hover method or a javascript based solution.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Wow great--thank you! Can I use static menu items in amongst dynamically displayed menu items from an XML file then?

So I guess I'd have to add the following to the menu control...but how would I tell the control that I want this image to appear at the top of each dropdown?

Code:
    <Items>
        <asp:MenuItem ImageUrl="~/Images/border_blank.gif"></asp:MenuItem>
    </Items>

Thanks

Daniel

 
PS - I said the menu is coming from an XML file -- more specifically it's coming from a sitemap file.
 
The menu control has a Items.AddAt method so you can just add the relevant items from your code behind file and specify which location you want it added at.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top