Updated the XP sytled menus to use either a definition list <dd> or an unordered list <ul> There has been a growing trend in the use of unordered lists within CSS based menus instead of nested DIV tags. Here I update the XP Style Menus to follow this trend and upon the requests of some fellow webmasters. Alas, I add a twist... I give two methods of formating the menus... a definition list or an unordered list.

In my preliminary compatibility tests, I found that using a definition list gave better backwards compatibility. It degraded better in non-standards compliant browsers and just plain looked great.

I also found that some versions of Windows Internet Explorer did not like my menu separator rules. Line height was not the 1 pixel as the rule states. Test results have varied and I am working to narrow the problem down.

The trade-off for using definition lists versus an unordered list is that of (backwards) compatibility over accessibility. If your main concern is with accessbility, then use the unordered list method. On the other hand, if your concern is with compatibility, then use the definition list method. If you are not sure, use the unordered list method. Personally, I would use the definition list method.

New rules for XP Menus
This updated version adds three rules in order to use definition/unordered lists. Additionally, the #menubar ID must be prepended to each menubar class. Change .menubar-separator and .menubar-selected and .menubar-selected>img to #menubar .menubar-separator and #menubar .menubar-selected and #menubar .menubar-selected>img


The first new rule sets the margin and padding of the DL and UL elements to zero. List-style sets the values to none. Also, the list-style may or may not apply to the DL or UL element and exists for redunancy.
#menubar dl, #menubar ul {
	display: block;
	list-style: none outside none;
	margin: 0px;
	padding: 0px;
	width: auto;
}

The second is simaliar to the one above. This rule sets the margin and padding of the DD, DT, and LI elements to zero. Here the list-style applies only to the LI element. The box rule for display is set to inline as a workaround for a bug that exists within IE's CSS box model.

The primary reason for not joining this rule with the one above is that the list items may require alternate style formatting. This will be done by having separate rules for the list and list items.
#menubar dd, #menubar dt, #menubar li {
	display: inline;
	list-style: none outside none;
	margin: 0px;
	padding: 0px;
	width: auto;
}

The last rule is to reset the display value to block. Only browsers that recongize the child selectors will apply this rule (currenly any Gecko based, Opera, and Konqueror).
html>body #menubar dd, html>body #menubar dt, html>body #menubar li {
	display: block;
	width: auto;
}
The lists
Creating the menus is much easier now... only a single DIV tag encapsulates the lists (definition or unordered).

Definition list based menu.
<div id="menubar">
  <dl>
    <dt><a href="xyz.html"><img src="images/home.gif" ..... align="top">Homepage<br></a></dt>
    <dt><a href="xyz.html"><img src="images/products.gif" ..... align="top">Products<br></a></dt>
    <dt class="menubar-separator"> <br></dt>
    <dt><a href="xyz.html"><img src="images/online.gif" ..... align="top">Online Store<br></a></dt>
    <dt><a href="xyz.html"><img src="images/downloads.gif" ..... align="top">Downloads<br></a></dt>
    <dt class="menubar-selected"><img src="images/support.gif" ..... align="top">Support<br></dt>
    <dt><a href="xyz.html"><img src="images/aboutus.gif" ..... align="top">About Us<br></a></dt>
    <dt class="menubar-separator"> <br></dt>
    <dt><a href="xyz.html"><img src="images/corporate.gif" ..... align="top">Corporate<br></a></dt>
    <dt><a href="xyz.html"><img src="images/worldwide.gif" ..... align="top">Worldwide<br></a></dt>
  </dl>
</div>

Unordered list based menu.
<div id="menubar">
  <dl>
    <lt><a href="xyz.html"><img src="images/home.gif" ..... align="top">Homepage<br></a></lt>
    <lt><a href="xyz.html"><img src="images/products.gif" ..... align="top">Products<br></a></lt>
    <lt class="menubar-separator"> <br></lt>
    <lt><a href="xyz.html"><img src="images/online.gif" ..... align="top">Online Store<br></a></lt>
    <lt><a href="xyz.html"><img src="images/downloads.gif" ..... align="top">Downloads<br></a></lt>
    <lt class="menubar-selected"><img src="images/support.gif" ..... align="top">Support<br></lt>
    <lt><a href="xyz.html"><img src="images/aboutus.gif" ..... align="top">About Us<br></a></lt>
    <lt class="menubar-separator"> <br></lt>
    <lt><a href="xyz.html"><img src="images/corporate.gif" ..... align="top">Corporate<br></a></lt>
    <lt><a href="xyz.html"><img src="images/worldwide.gif" ..... align="top">Worldwide<br></a></lt>
  </dl>
</div>


Known Issues



Download examples
Demo Standards Version (Definition and Unordered lists)

Demo Mozilla / Windows IE Version (Definition and Unordered lists)

examples_list.zip