Link to home
Start Free TrialLog in
Avatar of TimHudspith
TimHudspith

asked on

Formatting an ASP.Net Menu Control

This is my first attempt at building a website . . . I'm using ASP.Net.

Thus far I've done some simple HTML and CSS to create a header bar along the top containing the site logo on the left and a horizontal ASP.Net menu along the remainder. I populate the menu items and child items at runtime from a dataset of parent-child tables from a SQL Server database. So far OK, I can glide left to right over the menu items with my mouse and the subitems drop down below as expected, but I don't know how to progress from here as regards fine-tuning its behaviour and formatting.
SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TimHudspith
TimHudspith

ASKER

Thanks for the links. My menu looks just like the one shown in the CodeProject link - one static horizontal layer with three dynamic vertical submenus, each appearing to the right of the parent. One drawback of this control is that it does not allow you to style individual menu items, but I've done a workaround by giving certain items an identity using the href attribute, which I then style with CSS classes that target the href value.

The problem I have is on the right-hand side of the menu bar. There is no room to show the last two submenus, so I want to push them left of the parent, not to the right. So I need to create a style for the <ul> element containing these items. I looked at the markup rendered in the browser to find the ID of the <ul> tags, then created an external style with that selector to override the auto-generated inline style (using '!important'), but it won't override.
In the end I gave up with the ASP menu control. The amount of CSS manipulation it allows is so limited it's pretty much useless.