的开始时删除背景颜色
好的,这是我的&lt的代码;样式>。应该概述的盒子不起作用,它只是超过。
另外,我想知道如何使我的背景完全黑色
<div id="header">
</h1>
<style>
#header {text-align:middle}
.info-container {width: 840px; border: 1px solid #d8d5c6: padding: 4px; margin: 40px auto 0;}
.inner-border {background-color: #fcfbf9; border: 1px solid #d8d5c6; padding: 10px 20px;}
.coming-soon-visitor strong, .coming-soon-owner strong {font-weight: bold; color: #000;}
.coming-soon-owner {float: left; font-size: 14px; color: #6d6a5b; font-weight: normal; width: 400px; border-right: 1px solid #d9d6c5; padding: 10px 0; margin-bottom: 10px;}
.coming-soon-visitor {float: left; font-size: 14px; color: #6d6a5b; font-weight: normal; padding-left: 20px; padding: 10px 0 10px 20px; margin-bottom: 10px;}
</style>
<div class="info-container">
<div class="inner-border clear-fix">
<h3 class="coming-soon-owner">
Coming <strong>soon!</strong>
</h3>
<h3 class="coming-soon-visitor">
Hey! We are programming! <strong>Please </strong>wait!
</h3>
</div>
</div>
通过查看代码,我会说您有一个简单的浮动divs。clearfix
无法照顾。
我在这里使用的那个可以求和。
.group:after {
content: "";
display: table;
clear: both;
}
将其添加到您的.info-container
中应解决您的问题。
将其添加到.inner-border
类:
padding-bottom: 50px;
background-color: grey;
并在