简体   繁体   English

如何在 html 中将 Google reCaptcha V2 复选框居中

[英]How to center the Google reCaptcha V2 checkbox in html

Hi!你好! I wanna center the Google reCaptcha V2 checkbox middle in my contact form... But I don't know how to do it.我想在我的联系表格中将 Google reCaptcha V2 复选框居中...但我不知道该怎么做。 I also tried <div style=" margin:0 auto;"></div> Can someone please help me with this?我也试过<div style=" margin:0 auto;"></div>有人可以帮我吗? This is the code snippet and This is how it is now.这是代码片段这就是现在的样子。 I wanna bring it to the red mark我想把它带到红色标记

This is my website:- https://lasterleague.tk这是我的网站:- https://lasterleague.tk

My contact form:- https://lasterleague.tk/contact.html我的联系表格:- https://lasterleague.tk/contact.html

margin: 0 auto; will work fine if width of element is defined and not auto, and also you have to use this margin: 0 auto property in right place.如果定义了元素的宽度而不是自动,则可以正常工作,并且您必须在正确的位置使用此margin: 0 auto属性。 In your code you have to make some changes where you have written (I copied this from your contact form):在您的代码中,您必须在您编写的地方进行一些更改(我从您的联系表格中复制了此内容):

<div style=" width:304px; height : 78px">...</div>

change it to :将其更改为:

 <div style="margin:0 auto; width:304px; height : 78px">...</div>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM