下拉菜单如何在wordpress中右侧移动

时间:2014-07-19 19:26:06

标签: css wordpress drop-down-menu

使用wordpress的原生下拉菜单时遇到问题,我的菜单会删除左侧的元素,但我想将其移到右侧。 这是css代码

div#navigation 
  { 
   float: left; position: 
   relative; left: 50%; 
   margin-bottom: 35px; 
  }
select.mobile_menu { display: none; }
div#navigation ul { 
   margin: 0; 
   padding: 0; 
   float: left; 
   position: relative; 
   left: -50%; 
 }
 div#navigation ul li { 
    float: left; 
    position: relative; 
    margin: 0px; 
    margin-left: 50px; 
    padding-top: 12px; 
    padding-bottom: 10px; 
    font-family: 'Vollkorn', 'Times New Roman', serif; 
 }
div#navigation ul li:first-child { margin-left: 0px; }
div#navigation ul li ul.sub-menu { 
     display: none; 
     float: none; 
     position: absolute; 
     top: 50px; 
     z-index: 10000; 
     background: #F8F8F8; 
     border: 1px solid #CCC; 
     border-bottom: 0px; 
 }
div#navigation ul li:hover ul.sub-menu { display: block; }
div#navigation ul li ul.sub-menu li { 
     position: relative; 
     float: none; 
     margin: 0px; 
     border-bottom: 1px solid #CCC; 
     font-size: 14px; 
 }
div#navigation ul li ul.sub-menu li a { 
    display: block; 
    width: 200px; 
    height: 23px; 
    line-height: 23px; 
    text-align: center; }
div#navigation ul li ul.sub-menu li ul.sub-menu { 
    display: none; 
    position: absolute; 
    left: -202px; 
 }
div#navigation ul li ul.sub-menu li:hover ul.sub-menu { 
    display: block; 
    top: -1px;}
div#navigation ul li ul.sub-menu li ul.sub-menu li ul.sub-menu { display: none; }
div#navigation ul li ul.sub-menu li ul.sub-menu li:hover ul.sub-menu { 
    display: block; 
    top: -1px;
 }

这是我自己的网络和问题 photo 我应该在css中改变什么?

1 个答案:

答案 0 :(得分:0)

我解决了,只将左参数-200px更改为200px div#navigation ul li ul.sub-menu li ul.sub-menu { display: none; position: absolute; left:200px;