gpt4 book ai didi

html - CSS 间距关闭,不确定是什么原因造成的

转载 作者:太空宇宙 更新时间:2023-11-04 15:08:27 25 4
gpt4 key购买 nike

我正在处理一个表单,需要在 reCAPTCHA 字段上方添加注释。我已准备就绪,但 *To submit your message, please type the words below shown: note 和 reCAPTCHA 之间的间距有很大差距,我需要弄清楚如何使这两个元素在垂直方向上靠得更近。

我在注释的表单中使用段落标记,我不确定这是不是错误的形式??

Website Link

CSS:

/*Prayer Request Form*/

#prayer-form {
margin-bottom: 20px;
width: 960px;
height: 520px;
padding: 40px 30px;
margin-left: auto;
margin-right: auto;


}


form, fieldset, input, textarea {
margin: 0; padding: 0; border: 0; outline: none;
}


label {
float: left; clear: left; margin: 11px 20px 0 0; width: 65px;
text-align: left; font-size: 14px; color: #000000;

}


input {
width: 370px; height: 20px; padding: 5px 10px 5px 10px; margin: 0 0 23px 0;
background: #EDEDED;
border: 1px solid #808080;
font-family: sans-serif; font-size: 14px; color: #000000;
}



textarea {
width: 650px; height: 120px; padding: 10px 10px 5px 10px; margin: 0 0 20px 0;
background: #EDEDED;
border: 1px solid #808080;
overflow: auto;
font-family: sans-serif; font-size: 14px; color: #000000;
}


input[type=submit] {
width: 95px; height: 30px; float: left; clear: left; padding: 2px 5px 2px 5px; margin: 20px 0 0 85px;
color: #FFFFFF;
border: 1px solid #0000CD;
background: -moz-linear-gradient(top, #00BFFF 0%, #0000CD 100%); /* firefox */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#00BFFF), color-stop(100%,#0000FF)); /* webkit */
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#00BFFF', endColorstr='#0000CD');
cursor: pointer;
}

input[type=reset] {
width: 95px; height: 30px; float: left; padding: 2px 5px 2px 5px; margin: 20px 0 0 20px;
border: 1px solid #858585;
background: -moz-linear-gradient(top, #EDEDED 0%, #999999 100%); /* firefox */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#EDEDED), color-stop(100%,#999999)); /* webkit */
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#EDEDED', endColorstr='#999999');
cursor: pointer;
}


p captcha{
float: left; padding: 2px 0 0 85px;
font-family: sans-serif; font-size: 14px; color: #000000;

}

#captcha {
float: left; margin: 11px 0 20px 0; width: 445px; height: 110px; padding: 2px 5px 2px 85px;


}

HTML:

<!--/ Show Prayer Request Form-->

<div id="prayer-form">


<form name="prayer-form" action="send-mail.php" method="POST">

<label for="field_name">Name:</label> <input type="text" id="field_name" name="sender_name" placeholder="First Name, Last Name">
<br>
<label for="field_email">Email:</label> <input type="text" id="field_email" name="sender_email" placeholder="example@domain.com">
<br>
<label for="field_phone">Phone:</label> <input type="text" id="field_phone" name="sender_phone" placeholder="(444) 444-4444">
<br>
<label for="field_message">Prayer Request:</label>

<textarea id="field_message" name="sender_message" placeholder="How can we pray for you?"></textarea>

<p id="captcha"><b>*To submit your message, please type the words shown below:</b></p>

<div id="captcha">
<?php
require_once('recaptchalib.php');
$publickey = "*****************AzBk";
echo recaptcha_get_html($publickey);
?>
</div>


<input type="submit" name="send_message" value="Submit"> <input type="reset" value="Reset">

</form>

</div>

非常感谢您的帮助。

最佳答案

您需要在样式表中调整以下规则:

#captcha {
float: left;
margin: 11px 0 20px 0;
width: 445px;
height: 110px;
padding: 2px 5px 2px 85px;
}

您不需要指定高度,只需使用 height: auto 或一起省略即可。

您也可以省略 padding,仅使用 margin 即可为您提供足够的控制。最后,您可能不需要 float 段落。

关于html - CSS 间距关闭,不确定是什么原因造成的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15628389/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com