我在这里列出了我的页面页脚,我想要水平显示。在CSS中为无序列表设置高度?
但是因为我已经将它变成了一个内联列表来水平走向,所以背景图像被垂直切断。最大的是27px高。
所以我被卡住了......我知道为什么以下是在做它做的事情。但我如何解决它?
这里的HTML:
和CSS:
#footer ul {
height: 27px;
}
#footer ul li {
display: inline;
list-style: none;
margin-right: 20px;
}
#footer-tmdb {
background: url('../images/logo-tmdb.png') no-repeat 0 0;
padding-left: 140px;
}
#footer-email {
background: url('../images/icon-email.png') no-repeat 0 3px;
padding-left: 40px;
}
#footer-twitter {
background: url('../images/icon-twitter.png') no-repeat 0 0;
padding-left: 49px;
}
这里是什么样子:
正如你所看到的,图像的一半被切断。
解决方案越简单,请越好。
2011-05-10
Rowan
+0
'#footer的UL { 高度:27px;浮动:左 }否则给h八到'li' –
2011-05-10 16:33:33
+0
谢谢大家。我和约书亚的版本一起去了 –
2011-05-10 16:46:41