当您更改浏览器窗口的大小时,我的页面的主要内容(文本和表单)会在页面上水平移动。我的标志保持在固定位置。我找不到会导致这种情况发生的两个类之间的 css 差异。这是CSS:
.main {width:100%; padding:0; margin:0 auto; min-width: 1020px; overflow: hidden;}
.header { background:url(images/slider_bgpng200.png); background-repeat: repeat-x; padding:0; margin:0 auto; width: 100%; }
.headertop{width: 44%; background: #d3e5e8; height: 30px; min-width: 1020px;float: left; padding-left: 50px; margin: 0 auto;}
.block_header {margin:0 auto; width:1200px; padding:0; border:none; }
.space { float:left; padding:0; margin:0; }
.header_text { width:200px; float:right; font:normal 11px Tahoma, Geneva, sans-serif; color:#9a9a9a; padding:6px 10px 10px 10px; margin:0; text-align:center;}
.slider { background: transparent; margin:0 auto; padding:0; height:420px;}
.slider .gallery { margin:0 auto; width:980px; height:420px; padding:0;}
.slider .textholder {padding-top: 110px; float: left; width: 44%; font-family: 'Roboto', sans-serif; font-size: 40px; color: #93a0a2;padding-left: 30px;}
.formbox{float: right; width: 48%; padding-top: 90px; padding-right: 40px;}
这是html:
<div class="main">
<div class="header">
<div class="headertop"> <img src="images/avidestlogo50perresave.png" border="0" alt="logo" />
<div class="header_text"><a href="#">Email</a> | <a href="#">Client Login</a>
</div>
</div>
<div class="block_header">
<div class="space"><a href="index.html"></a>
</div>
</div>
<div class="slider">
<div class="gallery">
<div class="textholder">
Where Student and <br />
Alumni Freelancers <br /> Get Hired
</div>
<div class = "formbox">Form is here
</div>
</div>
</div>
</div>
</div>
</div>
该网站位于 avidest.com/schneer,因此您可以看到我在说什么。谢谢你的帮助。