开发者

Right side drop down menu

开发者 https://www.devze.com 2023-04-10 11:03 出处:网络
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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消