Open the HTML page in a browser. This code renders the following:
By modifying the CSS, we can move the submenus over to the right and hide them
until the user hovers over one of the parent menu items. Here are the steps:

Remove the default margins and padding from the list and list items:

ul, li {
margin: 0;
padding: 0;
}

Set the position of the main menu items to relative. Like with dropdown
menus, we will need to position the submenus using absolute positioning:

Chris is a prolific author and trainer, and the CEO of WatzThis?. His published books include Writing Computer Code, JavaScript for Kids, Coding with JavaScript For Dummies, Beginning HTML5 and CSS3 For Dummies, Webkit For Dummies, CIW eCommerce Certification Bible, and New Riders' XHTML.

About Webucator

Webucator provides instructor-led training to students throughout the US and Canada. We have trained over 90,000 students from over 16,000 organizations on technologies such as Microsoft ASP.NET, Microsoft Office, Azure, Windows, Java, Adobe, Python, SQL, JavaScript, Angular and much more. Check out our complete course catalog.