Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何清理ul和li的底部空间_Php_Html_Css - Fatal编程技术网

Php 如何清理ul和li的底部空间

Php 如何清理ul和li的底部空间,php,html,css,Php,Html,Css,我在李的底部得到了额外的空间 ul和class的样式css ul { display: table-cell; list-style: none; padding: 0px 0px 0px 0px; } li { width: 20px; float: left; } .Chair { background-image: url(Images/blnk.png); height: 40px; } PHP代码 while($r = $result->fetc

我在李的底部得到了额外的空间

ul和class的样式css

ul {
  display: table-cell;
  list-style: none;
  padding: 0px 0px 0px 0px;
}

li {
  width: 20px;
  float: left;
}

.Chair {
  background-image: url(Images/blnk.png);
  height: 40px;
}
PHP代码

while($r = $result->fetch_assoc()) {
   echo  '<ul id="sub">';
   if($r['seats'] == null){ 
      echo '<li class="Chair" ></li><ul>';
   }
}
while($r=$result->fetch_assoc()){
echo'
    ; 如果($r['seats']==null){ 回声“
    • ”; } }

根据我的评论,在
.Chair
课堂上移除或设置
高度:40px
。这就是完整的代码

 ul {
      display: table-cell;
      list-style: none;
      padding: 0px 0px 0px 0px;
    }

    li {
      width: 20px;
      float: left;
    }

    .Chair {
      background-image: url(Images/blnk.png);
    }

如果要添加高度,请设置
高度:20px

检查
上的.Chairlower
height
的高度。Chair
可以。我已经检查过了。底部空间来自somwhereelse@Hash.那么高度怎么办呢?试着使用li中的空间,因为图像的高度我设置了图像的高度。椅子20px;