摆脱CSS中的隐形空间

时间:2016-01-23 03:31:34

标签: html css

如何将菜单列表完全放到左侧?

css:
body {background: #111111;}

#wrapper {width:980px; margin:0 auto;}
#pageTop {width:100%; margin:0 auto; position:relative; text-align:center;}
#pageTop h1 a {font-size:45px; font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif; text-decoration:none; color:white;}
#mainNav {float:center; background:#1e1e1e; height:50px; width:100%; margin-top:-16px; position:relative; border-bottom-left-radius:5px; border-bottom-right-radius:5px;}
#menueList li { display:inline-block; margin: 0; list-style:none; padding: 15px;  width: fit-content; float:left;}
#menueList li a {font-family: 'Josefin Sans', sans-serif; font: 15px;text-decoration:none; color:white;}
#menueList a:hover{color:#1e1e1e; background:white; padding:15px;}
#content {width:940px; margin:30px auto; background:#1e1e1e; padding:20px; position:relative; float:center; border-radius:5px; font-size:16px; font-family: 'Josefin Sans', sans-serif; text-decoration:none; color:white; }

1 个答案:

答案 0 :(得分:1)

将此添加到您的css

#menueList { display: initial; }