0

我试图将这个菜单定位到顶部并居中我尝试调整了很多 CSS,但仍然没有

这是我的 jsbin

http://jsbin.com/welcome/74921/

body{
            background:#333 url(bg.jpg) repeat top left;
            font-family:Arial;
        }
        span.reference{
            position:fixed;
            left:10px;
            bottom:10px;
            font-size:12px;
        }
        span.reference a{
            color:#aaa;
            text-transform:uppercase;
            text-decoration:none;
            text-shadow:1px 1px 1px #000;
            margin-right:30px;
        }
        span.reference a:hover{
            color:#ddd;
        }
        ul.sdt_menu{
            margin-top:50px;
        }
        h1.title{
            text-indent:-9000px;
            background:transparent url(title.png) no-repeat top left;
            width:633px;
            height:69px;
        }
4

2 回答 2

0
ul.sdt_menu {
    margin-top: 150px; <--- get rid of this
    margin-left:auto; <-- add this
    margin-right:auto;  <-- add this
}
于 2013-01-15T21:30:34.453 回答
0
ul.sdt_menu {
  margin: YOURTOPVALUEHERE auto 0 auto;
  display: table;
  width: auto; /* or remove your width value (better) */
}
于 2013-01-15T21:37:23.087 回答