我在这里有一个功能齐全的 reCAPTCHA 小部件。它是更大的 HTML 表单的一部分,我很难调整从以下位置返回的图像:
<?php echo recaptcha_get_html($public_key); ?>
向表单本身添加任何填充/边距会将所有内容向右移动,但我只需要调整小部件。我的答案是否在于我可以围绕这个 PHP 脚本的 CSS 属性?
如果有帮助,我会显示整个表格......提前感谢您提供任何提示或解决方案。
<form id="feedback" method="post" action="">
<p>
<label for="name">Name:</label>
<input name="name" id="name" type="text" class="formbox"
<?php if ($missing || $errors) {
if(isset($name)){
echo 'value="' . htmlentities($name, ENT_COMPAT, 'UTF-8') . '"';
}
} ?>>
<?php if ($missing && in_array('name', $missing)) { ?>
<span class="warning"><font color="red">Please enter your name</font></span>
<?php } ?>
</p>
<p>
<label for="email">Email:</label>
<input name="email" id="email" type="text" class="formbox"/
<?php if ($missing || $errors) {
if(isset($email)){
echo 'value="' . htmlentities($email, ENT_COMPAT, 'UTF-8') . '"';
}
} ?>>
<?php if ($missing && in_array('email', $missing)) { ?>
<span class="warning"><font color="red">Please enter your email address</font></span>
<?php } elseif (isset($errors['email'])) { ?>
<span class="warning"><font color="red">Invalid email address</font></span>
<?php } ?>
</p>
<p>
<label for="comments">Comments:
<?php if ($missing && in_array('comments', $missing)) { ?>
<span class="warning"><font color="red">Please enter your comments</font></span>
<?php } ?>
<br /></label>
<textarea name="comments" id="comments" cols="60" rows="8"><?php
if ($missing || $errors) {
if(isset($comments)){
echo htmlentities($comments, ENT_COMPAT, 'UTF-8');
}
} ?></textarea>
</p>
<script type="text/javascript">
var RecaptchaOptions = {
theme : 'white'
};
</script>
<?php
//Display the error message if the values don't match.
if (isset($errors['recaptcha'])) { ?>
<p><font color="red">The values didn't match. Try again.</font></p>
<?php } ?>
<?php echo recaptcha_get_html($public_key); ?>
<p>
<input name="send" id="send" type="submit" value="Send message" />
</p>
</form>