尽管阅读了不少于十几篇关于此的帖子,但我仍然无法阻止此表单标签使用我能找到的每个技巧搞砸我的页面布局。我显然遗漏了一些东西。页面验证没有问题,但此表单标签正在按下我的导航栏。
以下是表格:
<div class="skyblock2">
<div class="form">
<h1 class="white">If you have questions, we will answer all of them. <br />
Leave your phone number and we will call you in 1 minute</h1>
<form name="call-form" method="post" id="call-form" action="mysqlit.php" style="display: inline; padding: 0; margin: 0; background-color: transparent;">
<input type="text" id="name" name="name" value="Your Name" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Your Name';}" />
<input type="text" id="telephone" name="telephone" value="Phone Number" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Phone Number';}" />
<a href="javascript:{}" onclick="document.getElementById('call-form').submit();" class="sky2">Give me a call</a>
</form>
</div>
</div>
这是CSS:
div.skyblock2 {
width : 100%;
margin : 0 auto;
background-color : #0093cb;
color : white;
text-align : center;
}
div.form {
padding : 25px 0;
width : 80%;
margin : 0 auto;
text-align : center;
}
答案 0 :(得分:-1)
你可以试试这个:
CSS
.nav { position: absolute; top: 0; right: 0; }
.top { position: relative; }