"Is there a way to create a css vertical pop-out menu in css that will work on most browsers?" The answer is "Yes, provided..." see DEMO above and code below.

Tedd Sperling prepared the CSS menu and Peter Nederlof with help from Arnoud Berendsen, Martin Reurings, and Robert Hanson have prepared a brilliant piece of code (csshover.htc) that makes this pretty simple.

To make a css vertical menu work, you'll need to:

<!--[if lt IE 7]>
<style type="text/css" media="screen">
body{behavior:url(csshover.htc);}
</style>
<![endif]-->
 
	
<div id="menuv-container">
<div id="menuv">
	<ul>
		<li><a href="#" class="top_parent">Item 1</a>
		<ul>
			<li><a href="#">Sub 1:1</a></li>
			<li><a href="#" class="parent">Sub 1:2</a>
				<ul>
				<li><a href="#">Sub 1:2:1</a></li>
				<li><a href="#">Sub 1:2:2</a></li>
				<li><a href="#">Sub 1:2:3</a></li>
				<li><a href="#">Sub 1:2:4</a></li>
				</ul>
			</li>
			<li><a href="#">Sub 1:3</a></li>
			<li><a href="#" class="parent">Sub 1:4</a>
				<ul>
				<li><a href="#">Sub 1:4:1</a></li>
				<li><a href="#">Sub 1:4:2</a></li>
				<li><a href="#">Sub 1:4:3</a></li>
				<li><a href="#">Sub 1:4:4</a></li>
				</ul>
			</li>
			<li><a href="#" class="parent">Sub 1:5</a>
				<ul>
				<li><a href="#">Sub 1:5:1</a></li>
				<li><a href="#">Sub 1:5:2</a></li>
				<li><a href="#">Sub 1:5:3</a></li>
				<li><a href="#">Sub 1:5:</a></li>
				<li><a href="#">Sub 1:5:5</a></li>
				</ul>
			</li>
		</ul>
		</li>
	</ul>
	
	<ul>	
		<li><a href="#" >Item 2</a>
	</ul>
		
	
	
</div> 	<!-- end the menuv-container div -->  
</div>	<!-- end the menuv div --> 
 				

The import things to realize here are:

  1. The csshover.htc code coupled with the sniffer code makes IE act as it should. If it were not for those pieces of code, IE would just sit there.
  2. This technique works for all browsers EXCEPT for IE 5.23 and below. These outdated browsers don't even recognize Microsoft's embedded commands.
  3. The position of the menu is dependant upon the "menuv-container" rule in the css document. Change the top and left values and the placement of the menu will adjust accordingly.
  4. The only other things you may want to change are the colors of the menu. In this example, the background is RoyalBlue and the mouse-over state is CornFlowerBlue. As such, the colors are pretty obvious to identify and change.
  5. While it may be obvious to most, you will need to change the"#" to your links and the text (i.e., Item 1) to what you want.
  6. Place the csshover.htc and the menuh.css files where your web page can find them. In this example, they are located in the css subdirectory (css/csshover.htc and css.menuh.css.