Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/32.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 添加高度后文本溢出容器:自动添加到容器_Html_Css - Fatal编程技术网

Html 添加高度后文本溢出容器:自动添加到容器

Html 添加高度后文本溢出容器:自动添加到容器,html,css,Html,Css,我有一个网页,其中文本溢出一个容器div,即使在应用height:auto之后到包含的div。页面的组成如下所示: <html> <head> <body> <div id="wrapper"> <div id="inner_wrapper"> <div id="content_left"> <div class="main_content_text">

我有一个网页,其中文本溢出一个容器div,即使在应用
height:auto之后
到包含的div。页面的组成如下所示:

<html>
<head>
<body>
<div id="wrapper"> 

    <div id="inner_wrapper">

        <div id="content_left">
                <div class="main_content_text">
                      Overflowing text
                </div><!--end of main_content_text-->
        </div><!--end of content_left-->

        <div id="content_right">
        </div><!--end of content_right-->

    </div><!--end of inner_wrapper-->
 </div><!--end of wrapper-->
 </body>
 </html>
我正在应用它的页面位于此处

添加以下规则

#内部包装器:{content:”;显示:块;溢出:隐藏;清除:两者;高度:0;}


它将清除浮动,无需添加额外的
元素

为所需的div设置
溢出:自动

#inner_wrapper{
width: 100%;
background-color: white;
min-height: 900px;
height: auto;
margin: 0px auto;
  }

#content_left{
padding: 10px;
margin: 10px 10px 30px 20px;
width: 57%;
min-height: 300px;
float: left;
 }

.main_content_text{
width: 625px;
height: auto;
font-weight: normal;
font-family: 'Source Sans Pro','Ubuntu Light','Ubuntu Condensed',Ubuntu,Tahoma,Arial,sans-serif;
font-size: 15px;
line-height: 20px;
margin-top: 30px;
padding-bottom: 10px;
}