I’m creating a horizontal menu with sub-menus under it (fig c) but all I could get was fig a but I want something like fig b or fig c:

HTML and CSS code for fig a:
<html>
<head>
<style type="text/css">
ul li{
display:inline;
background-color:red;
}
ul li ul{
display:inline;
}
ul li li{
position:relative;
top:20px;
display:inline;
background-color:green;
}
li{
border:1px solid white;
}
li:hover{
border:1px solid blue;
}
</style>
<title>Untitled Document</title>
</head>
<body>
<ul>
<li>overview</li>
<li>alarm
<ul>
<li>view</li>
<li>config</li>
</ul>
</li>
<li>log</li>
<li>config
<ul>
<li>tag</li>
<li>security</li>
</ul>
</li>
</ul>
</body>
</html>
The question is: how can I create an output like fig b or fig c? I want the submenus to appear right under their parent menu without the parent menu being extended so long.
@Alex; check this link http://jsfiddle.net/sandeep/9SH4S/ may that’s help you.
css: