I need help creating a horizontal menu with a sub-menu that is full width and centered. Does anyone have any advice on how to achieve this?
Thank you in advance!
The following HTML code creates a horizontal menu and sub-menu, but they are currently aligned to the left. I am struggling to make them both full width and centered.
HTML:
<div id="menu">
<ul id="nav">
<li><a href="#">Menu 1</a>
<ul>
<li><a href="#">Menu 1 Submenu item 1</a></li>
<li><a href="#">Menu 1 Submenu item 2</a></li>
<li><a href="#">Menu 1 Submenu item 3</a></li>
</ul>
</li>;
// Rest of the HTML code continues...
CSS:
<style type="text/css">
#menu {
width: 960px;
height: 40px;
clear: both;
}
// CSS styling continues...