+ -
当前位置:首页 → 问答吧 → firefox li宽度无效

firefox li宽度无效

时间:2011-05-18

来源:互联网

在firefox下 li如果不写内容,即使设置了宽度也无效,如何解决

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title><style>
div {width:100%; height:200px; border:1px #000000 solid;}
ul {list-style:none; width:80%; height:100px; border:1px #333333 solid}
li {
       display:block;
       float: left;
}
.a {background:#FF0000; width:200px;}
.b {background:#00FF00; width:100px;}
.c {background:#0000FF; width:300px;}
</style>
<body>
<div>
<ul>
<li class="a">使用</li>
<li class="b"></li>
<li class="c">ewrewr</li>
</ul>
</div>
</body>

作者: kathy052   发布时间: 2011-05-18

给LI再设置下高度。

作者: yoom   发布时间: 2011-05-18