Jump to content

How are drop down menus created?


astralaaron

Recommended Posts

All you need is HTML, CSS and sometimes Javascript.Here's a basic example of a dropdown menu only using CSS:HTML:<a href="#" id="menu">Hover</a><ul><li>Menu item 1</li><li>Menu item 2</li><li>Menu item 3</li><li>Menu item 4</li></ul>CSS:a#menu + ul {display: none;}a#menu:hover + ul {display: block;}

Link to comment
Share on other sites

<html><head><link rel="stylesheet" style="text/css" href="drop.css"></head><body><a href="#" id="menu">Hover</a><ul><li>Menu item 1</li><li>Menu item 2</li><li>Menu item 3</li><li>Menu item 4</li></ul></body></html>and css file:a#menu + ul {display: none;}a#menu:hover + ul {display: block;}didnt work

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...