我正在处理一个带有 Wrapper div 的页面,它是容器。
我在右边有 1 个 div,它使用浮点数留在那里。当左侧的主容器小于右侧的容器时,右侧的容器似乎与包装纸重叠。
HTML
<body>
<div id="Wrapper">
<div id="Title">Title</div>
<div id="SubTitle">SubtTitle</div>
<br />
<div id="Menu">Home | Our Story | Share A Memory | Information | About Us</div>
<br />
<div id="CountDown">
<div id="CountDownTitle">Title</div>
<hr />
Some<br />
Random<br />
stuff<br />
</div>
<div id="Info">
This is a test. This is only a test. This is a test. This is only a test. This is a test. This is only a test. This is a test. This is only a test. This is a test. This is only a test. This is a test. This is only a test. This is a test. This is only a test. This is a test. This is only a test. This is a test. This is only a test. This is a test. This is only a test. This is a test. This is only a test. This is a test. This is only a test. This is a test. This is only a test. This is a test. This is only a test. This is a test. This is only a test. This is a test. This is only a test. This is a test. This is only a test. This is a test. This is only a test. This is a test. This is only a test. This is a test. This is only a test.
</div>
</div>
</body>
CSS
body {
background-image: url('../PNGs/Background.png');
font-family: "Palatino Linotype";
font-size: 14px;
}
#CountDown {
background-color: #FFFFFF;
border: 1px black solid;
font-family: "Palatino Linotype";
font-size: 12px;
float: right;
height: auto;
opacity: 0.6;
padding-bottom: 10px;
padding-left: 10px;
padding-right: 10px;
text-align: center;
text-shadow: 0px, 0px, #000000;
width: 20%;
}
#CountDownTitle {
color: #000000;
font-family: Pristina;
font-size: 16px;
font-weight: bold;
margin-top: 10px;
src: url('../Elements/PRISTINA.ttf');
text-align: center;
}
#Info {
background-color: #FFFFFF;
border: 1px black solid;
font-family: "Palatino Linotype";
display: block;
height: auto;
opacity: 0.6;
padding-bottom: 10px;
padding-left: 10px;
padding-right: 10px;
padding-top: 10px;
text-align: justify;
text-shadow: 0px, 0px, #000000;
width: 70%;
}
#Menu {
background-color: #FFFFFF;
border: 1px black solid;
display: block;
height: 50px;
opacity: 0.6;
width: 100%;
}
#SubTitle {
color: #FFFFFF;
font-family: Pristina;
font-size: 18px;
src: url('../Elements/PRISTINA.ttf');
text-align: center;
}
#Title {
color: #FFFFFF;
font-family: Pristina;
font-size: 48px;
src: url('../Elements/PRISTINA.ttf');
text-align: center;
}
#Wrapper {
border: 1px black solid;
clear: both;
height: auto;
margin-bottom: auto;
margin-left: auto;
margin-right: auto;
margin-top: 75px;
width: 800px;
z-index: 1;
}