我无法解决。我的内容在浮动左侧css中:
float: left;
height: auto;
margin: 0px 22px;
clear: none;
min-width: 66.768799%;
max-width:100%;
width:0;
溢出:自动;
和我的右侧模块css
float: right;
height: auto;
margin: 0px 15px 0px 0px;
clear: none;
width: 28.461538%;
溢出:自动;
它们位于包装器
中float: none;
height: auto;
margin-left: auto;
margin-top: 0px;
clear: none;
width: 100%;
max-width: 1300px;
margin-right: auto;
background-color:
案例是当我隐藏一个模块时,内容不能100%表示,仍然是66%
#content {
float: left;
height: auto;
margin: 0px 22px;
clear: none;
min-width: 66.768799%;
max-width:100%;
width:0;
overflow: auto;
}
#right_module {
float: right;
height: auto;
margin: 0px 15px 0px 0px;
clear: none;
width: 28.461538%;
overflow: auto;
}
#wrapper {
float: none;
height: auto;
margin-left: auto;
margin-top: 0px;
clear: none;
width: 100%;
max-width: 1300px;
margin-right: auto;
background-color: rgb(226, 208, 168);
padding: 10px;
overflow: auto;
}
<div id="wrapper">
<div id="content">Curabitur venenatis vehicula mattis. Nunc eleifend consectetur odio sit amet viverra. Ut euismod ligula eu tellus interdum mattis ac eu nulla. Phasellus cursus, lacus quis convallis aliquet, dolor urna ullamcorper mi, eget dapibus velit est vitae nisi. Aliquam erat nulla, sodales at imperdiet vitae, convallis vel dui.</div>
<div id="right_module">Nunc eleifend consectetur odio sit amet viverra. Phasellus cursus, lacus quis convallis aliquet, dolor urna ullamcorper mi, eget dapibus velit est vitae nisi. Aliquam erat nulla, sodales at imperdiet vitae, convallis vel dui. Ut euismod ligula eu tellus interdum mattis ac eu nulla. </div>
</div>
rgb(226,208,168); 填充:10px;
案例是当我隐藏一个模块时,内容不能100%表示,仍然是66%。请帮助我解决问题
答案 0 :(得分:0)
从width: 0;
选择器中删除#content {
。