如何使页面左上角的徽标与其下方的文本对齐?此外,无论我制作的浏览器窗口大小如何,我都需要徽标与其下方的文本保持一致。我已尝试更改 block_header 类的填充、边距和浮动设置,但如果浏览器窗口未按正确大小打开,则徽标和文本未对齐。这是我的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%; }
.header .headertop{width: 100%; background: #d3e5e8; height: 30px;}
.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 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,因此您可以看到我在说什么。谢谢你的帮助。