Graham
Keyarn For a start <div> should not be in <span> div is a block element span is inline and your nesting is wrong
<p> should not be in <span> either and you have that nested wrong as well
wrap the menu code in a outer <div>
Separate script or add the function to the other
Click the button to show the menu code
demo on
http://baretest.xtgem.com/button
remember a lot of mobile browsers cannot handle "dynamic" code
this nor the other will work on many versions of opera mini or ucweb