我是 PHP 新手!在提交表单之前,我已经设法让我的 reCAPTCHA 框位于页面中央,但是一旦提交了表单,recaptcha 框和表单就会被分流到左侧,而结果显示居中对齐。
有谁知道我如何确保一旦提交表单它就不会移动?
抱歉,我是 PHP/CSS/HTML 的新手 这是我的表单的 PHP HTML 代码
<div id="form">
<form method="post" action="niindex.php"><table>
<th><h2>I am searching for</h2><th>
<tr><td><select name="categories"><?php echo $str_options; ?></select></td></tr>
<br />
<tr><td><?php echo recaptcha_get_html($publickey); ?></td></tr>
<tr><td><input type="submit" id="submit" name="submit" value="Submit" /></td></tr>
</table></form>
这是我的表单 CSS:
#form{
font-family:"Century Gothic";
border:2px dotted #FFB6D7;
text-align:center;
display:inline-block;
padding-top:25px;
padding-bottom:25px;
padding-right:100px;
padding-left:100px;
最佳答案
尝试这种风格:-
<div class="captcha">
Your Captcha code.
</div>
#recaptcha_area {
width: 440px;
margin: auto;
}
关于php - reCAPTCHA 集中对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20630211/