这是我在这里的第一个帖子,因为我已经束手无策了,所以我想我应该跳进去,最后寻求一些帮助!
我有一个我正在设计的网站上的“联系我们”部分,其中包含一个关于我们的小段落,电子邮件和电话。在它旁边有一个我从php form builder那里得到的电子邮件联系表单。一切都很顺利,直到我把那个坏男孩扔了进去。
任何人,这是我的代码联系我们‘包装器’:
#contact {
background-image:url(img/contact_bg.jpg);
background-repeat: no-repeat;
width: 820px;
height: 459px;
margin: 25px 70px 50px 70px;
clear: both;
}
#thanks {
width: 324px;
height: 100px;
padding-top: 35px;
}
#thanks span {
font-size: 1.5em;
font-weight: normal;
font-style: italic;
letter-spacing:1px;
color: #ffffff;
text-shadow: 1px 1px 1px #000000;
text-decoration: none;
padding: 0 0 0 25px;
}
#details {
width: 324px;
height: 63px;
padding-top: 25px;
clear: both;
}
#details span {
font-size: 1.115em;
font-weight: normal;
font-style: italic;
letter-spacing:1px;
color: #ffffff;
text-shadow: 1px 1px 1px #000000;
text-decoration: none;
padding: 0 0 0 25px;
clear: both;
}
#about {
width: 324px;
clear: both;
}
#about h2 {
font-size: 1.618em;
font-weight: normal;
letter-spacing:1px;
color: #ffffff;
text-shadow: 1px 1px 1px #000000;
padding-left: 25px;
text-decoration: none;
clear: both;
}
#about span {
font-size: 1em;
font-weight: normal;
letter-spacing:1px;
color: #ffffff;
text-shadow: 1px 1px 1px #000000;
line-height: 14px;
text-decoration: none;
padding: 10px 0 0 25px;
clear: both;
}这是我的表单css:
#form {
margin:0 auto;
text-align:left;
width:391px;
height: 459px;
float: right;
}
form.appnitro {
margin:20px 20px 0;
padding:0 0 20px;
}以下是一些截图:
这是它应该是什么样子的:

这就是它现在的样子:

任何帮助都是非常感谢的,如果你需要更多的信息,请让我知道。
非常感谢!
发布于 2012-01-10 06:42:48
您的#thanks和#about都是浮动的,所以您的联系人表单虽然是浮动的,但会显示在它们的下方。你需要同时浮点#thanks和#about float:left。
还有很多clear:both会重置文档流,这可能会导致您看到的一些问题。不过,如果不看实际的HTML,就很难说。
发布于 2012-01-10 06:46:31
您所需要做的就是在左侧的内容周围放入另一个div,并将其向左浮动,如下所示
<div style="float:left">
<div id="thanks">
<span>Thank you for your interest in Dan James construction. Please contact us using a method convenient for you.</span>
</div>
<div id="details">
<span>Tel: 07749 121959</span>
<span>Email: info@danjamesconstruction.com</span>
</div>
<div id="about">
<h2>ABOUT US</h2>
<span>Dan James construction are specialists in loft
conversion based in North London and covering the whole of the M25 area.</span><span>We guide you through every stage of your
development journey, right from the no obligation FREE estimate to the fine finishing touches.</span><span>So whether you're looking for more space or looking to add value get in touch today to start your very own conversion</span>
</div>
</div>这应该可以让我知道它的进展如何;-)
https://stackoverflow.com/questions/8796128
复制相似问题