A Definition List Menu
Pre 2006
copyright © stu nicholls - CSS play
Information
This menu is just a definition list with styling.
I know that I have advocated not using list for menus, but that was before I had fully investigated the alternatives. I still disagree with the use of unordered lists but I will concede that definition lists are a better way to go.
With definition lists you have the option of two different methods of use (maybe three).
- use the 'dt' for the navigation title and the 'dd' for the navigation links - as my menu above
- use the 'dt' for the navigation links and the 'dd' to elaborate on each link.
- use the 'dt' for the navigation links and the 'dd' to elaborate on each link and place further links within the 'dd' text if appropriate.
This allows definition lists to be much more flexible than unordered lists and gives more 'layers for styling. It is also easier to style as you can just style the link and ignore the 'dl' and 'dt', the only styling that may be necessary is to remove the indent on the 'dd'.
The above menu has a background image in the 'dl', a background image in the 'dt' and background images in the 'dd' links and it will not break when larger font sizes are selected.
Copyright
You may use this method on your personal 'non-profit' web site without seeking my permission. A link back to CSSplay is always appreciated.
Commercial usage is also permitted without seeking approval, but I would ask that a donation is considered to support my work on CSSPlay.
If you are having problems integrating any of my demonstrations into your website then I now offer a service to fault find and correct any errors that you may have introduced. Please email me for more information.