Found开发者_开发知识库 a nice drop down menu:
Demo: http://www.jqueryload.com/examples/menu/
HTML, CSS & JavaScript: http://www.jqueryload.com/jquery-dropdown-menu-with-google-style
I've aligned the main menu to the right side of the browser window. I wanted to have the selected drop down menu open to the left (as in the example, the drop down container is wider than the main menu selector). In other words, I'm hoping to have the mirror image.
Can this menu be updated to work as I'd hoped?
.menu ul li {
padding: 0;
float: right;
position: relative;
}
.menu ul li ul {
position: absolute;
border: 1px solid #C3D1EC;
box-shadow: 0 1px 5px #CCCCCC;
margin-top: -1px;
display: none;
padding: 0px 16px 0px 0;
right: 0px;
white-space: nowrap;
}
That will align it to the right. CSS used include position:relative
and float:right
on the <li>
's and right:0px
and white-space:nowrap
on the embedded <ul>
's
精彩评论