Well, for the display in the browser here's a couple of good a examples.
With regards to how you're going to organize menu elements in the database it will very much depend on the nature of your data but a good general model is for each element to have an attribute, let's call it parent, which contains the unique id of the element which comes above it in the tree. Element(s) at the root of the tree then have a parent id of zero. This makes structure makes it very quick and easy to pull out large, complex, nested loops.
HTH
Bubble