I am looking to have side-ways dropdown menu that could be clicked. Upon hovering over the list items, it that list items has any nested li items, it will show up. Here is my current code. you can paste it in http://www.bootply.com/ to see how it looks. It currently is very bad. it is displaying everything at the same time. and even one of the items is hidden behind another list item. I tried to follow this post. but I could not get it working. I am using bootstrap 3 in my HTML. so if there is a way to do it with bootstrap3 , that would be fine too.
Here is my html with inline css at the end:
<div class="col-xs-6 col-sm-3 sidebar-offcanvas" id="sidebar" role="navigation">
<div class="list-group">
<li id="settings" class="list-group-item">toyota highlander
<ul id="test">
<li><a href="/search/57/atlanta/">atlanta</a></li>
<li><a href="/search/57/austin/">austin</a></li>
<li><a href="/search/57/boston/">boston</a></li>
<li><a href="/search/57/chicago/">chicago</a></li>
<li><a href="/search/57/seattle/">seattle</a></li>
</ul>
</li>
<li><a href="/search/56" class="list-group-item ">honda fit </a></li>
<li id="settings" class="list-group-item ">ford explorer
<ul id="test">
<li><a href="/search/54/raleigh/">raleigh</a></li>
<li><a href="/search/54/sacramento/">sacramento</a></li>
<li><a href="/search/54/sandiego/">sandiego</a></li>
<li><a href="/search/54/seattle/">seattle</a></li>
</ul>
</li>
</div>
</div><!--/span-->
</div><!--/row-->
<style>
li#settings {
position:absolute;
overflow: visible;
}
li#settings:hover > ul {
cursor:pointer;
display:block;
}
ul#test {
display: none;
white-space: nowrap;
list-style: none;
position: absolute;
top:34px;
}
</style>
In this bootstrap template, there are links on right side of page, as you hover over each link, I want to display li items with-in that link. if there are no li-items, the link itself will be clickable
EDIT:
latest trial here:
<div class="col-xs-6 col-sm-3 sidebar-offcanvas" id="sidebar" role="navigation">
<div class="btn-group-vertical">
<div id="sidebar" class="sidebar-nav span3">
<ul class="nav nav-tabs nav-stacked">
<ul class="dropdown-menu" style="display: block; position: static; margin-bottom: 5px; *width: 180px;">
<li class="dropdown-submenu active "> <a tabindex="-1" href="#">toyota highlander </a>
<ul class="dropdown-menu">
<li><a href="/search/57/atlanta/">atlanta</a></li>
<li><a href="/search/57/austin/">austin</a></li>
<li><a href="/search/57/boston/">boston</a></li>
<li><a href="/search/57/chicago/">chicago</a></li>
<li><a href="/search/57/seattle/">seattle</a></li>
</ul>
</li>
<li class="nav-menu"><a href="/search/56" class=" ">honda fit </a></li>
<li class="dropdown-submenu "> <a tabindex="-1" href="#">ford explorer </a>
<ul class="dropdown-menu">
<li><a href="/search/54/raleigh/">raleigh</a></li>
<li><a href="/search/54/sacramento/">sacramento</a></li>
<li><a href="/search/54/sandiego/">sandiego</a></li>
<li><a href="/search/54/seattle/">seattle</a></li>
</ul>
</li>
</ul>
</ul>
</div>
</div>
</div>