Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/71.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/38.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
Html 如何在一些div下面添加水平线?_Html_Css - Fatal编程技术网

Html 如何在一些div下面添加水平线?

Html 如何在一些div下面添加水平线?,html,css,Html,Css,我相信这将是非常基本的,但我对编码相当陌生,我还在学习。我有以下divs: <div class="wrapper"> <div class="panel-panel panel-col-left"> <div class="inside"><?php print $content['top_left']; ?></div> </div> <div class="panel-panel panel-col

我相信这将是非常基本的,但我对编码相当陌生,我还在学习。我有以下
div
s:

<div class="wrapper">
 <div class="panel-panel panel-col-left">
  <div class="inside"><?php print $content['top_left']; ?></div>
  </div>
  <div class="panel-panel panel-col-middle">
   <div class="inside"><?php print $content['top_middle']; ?></div>
  </div>
  <div class="panel-panel panel-col-right">
   <div class="inside"><?php print $content['top_right']; ?></div>
  </div>
 </div>
</div>
显然,这没有正确显示:水平线位于顶部


我做错了什么?

因为您浮动了子div,所以需要限制浮动div容器的块格式上下文,并将
溢出:自动
添加到
.wrapper
,以便它可以再次包含它们:

.wrapper {
    border-bottom: 1px solid #ccc;
    overflow:auto;
}

因为您浮动了子div,所以需要限制浮动div容器的块格式上下文,并将
overflow:auto
添加到
.wrapper
,以便它可以再次包含它们:

.wrapper {
    border-bottom: 1px solid #ccc;
    overflow:auto;
}

您需要清除浮动元素。您可以在
包装器上使用clearfix或
溢出:hidden


您需要清除浮动元素。您可以在
包装器上使用clearfix或
溢出:hidden


在整个部分或每个内容部分下面?此外,对于Lorum Ipsum文章,您的html+1中没有
.top wrapper
类在整个部分或每个内容部分下面提到Aldus PageMaker?此外,在html+1中没有提到Aldus PageMaker LOL的Lorum Ipsum文章的
.top wrapper