下拉菜单问题

时间:2014-02-20 06:57:04

标签: html css

我有一个下拉菜单问题。我想将菜单放在右上角,但每次调整屏幕大小时,菜单都会从底部开始。 如何在多种屏幕尺寸上修复它?

感谢

[http://jsfiddle.net/6YZ8w/]

2 个答案:

答案 0 :(得分:0)

检查此link

Do you want like this?

It is not clear from your question how the design should be.

BTW, the links were coming out because you were giving the inside div's position:absolute. So the links were losing relation with the main div Nav.

如果您想了解更多关于在CSS中进行定位的工作,请仔细阅读link

答案 1 :(得分:0)

您可以尝试实施以下示例

.mymenu {
    widht:100%;
    background: url(../images/mbg.png) #F00;
    height:40px;
    border-bottom: #21b8ff solid 4px;
    margin:0px 0px 0px 0px;
    overflow:hidden;
}

.mymenu .menu {
    padding-top:5px;
    padding-right: 60px;
}

.mymenu .menu a{
    margin-top:3px;
    float:right;
    text-decoration: none;
    font-family: SC_DUBAI;
    font-size: 20px;
    color: #fff;
    padding-left: 10px;
    padding-right: 10px;
    margin:0px 0px 0px 0px;
    border-right: #4c4c4c solid 1px;
    border-left: #818181 solid 1px;
    height:40px;
}

.mymenu .menu a:hover{
    color:#636363;
    background: #21b8ff;
    margin:0px 0px 0px 0px;
}

JSFiddle工作正常。