Any have any idea how to get reCaptcha 2.0 to center?

22,113 views
Skip to first unread message

Robert Gass

unread,
Feb 6, 2015, 11:32:40 AM2/6/15
to reca...@googlegroups.com
I've found this, but it's not working for me.

#recaptcha_area, #recaptcha_table { 
      margin: 0 auto !important; 

Robert Gass

unread,
Feb 6, 2015, 4:48:17 PM2/6/15
to reca...@googlegroups.com
I was able to get this to work.  Basically, the div surrounding the div assigned to reCaptcha needs the css applied to it with a width.

CSS:
#recaptcha {
    width: 304px;
    margin: 0 auto;
}

html:

<div id="recaptcha">

<div id="getdata" class="g-recaptcha" data-sitekey="xxx"></div>

</div>



--
You received this message because you are subscribed to a topic in the Google Groups "reCAPTCHA" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/recaptcha/szv-Elmokk0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to recaptcha+...@googlegroups.com.
To post to this group, send email to reca...@googlegroups.com.
Visit this group at http://groups.google.com/group/recaptcha.
For more options, visit https://groups.google.com/d/optout.

Marius de Bruyn

unread,
Feb 7, 2015, 5:30:51 PM2/7/15
to reca...@googlegroups.com
I had the same problem: you were given the following, correct?
<div class="g-recaptcha" data-sitekey="your key code"></div>

so all you need to do is add what's highlighted below:
<div align="center" class="g-recaptcha" data-sitekey="your key code"></div>

that will solve it and it will always be in the center!

Andres Montero

unread,
Feb 7, 2015, 10:04:05 PM2/7/15
to reca...@googlegroups.com
I make this code and is working for me: 

.g-recaptcha > div > div{
 margin
10px auto !important;
 text
-align: center;
 width
: auto !important;
 height
: auto !important;
}

Massimiliano Ranauro

unread,
Mar 5, 2016, 2:38:28 PM3/5/16
to reCAPTCHA
Great!! It's works fine for me too! Thank you!

Mitch Alves

unread,
Sep 6, 2016, 5:20:50 PM9/6/16
to reCAPTCHA
This worked nicely, thanks!

Stefano Marchiori

unread,
Oct 12, 2016, 12:25:06 PM10/12/16
to reCAPTCHA
I think that now there is a ">div" more.
For me work fine this code:
.g-recaptcha > div{

Aaron Ekinaka

unread,
Oct 23, 2017, 11:30:12 PM10/23/17
to reCAPTCHA
Worked perfectly. Thank you!

Cane Kostovski

unread,
Jun 12, 2019, 5:40:49 PM6/12/19
to reCAPTCHA
Nothing I try moves the recaptcha from the bottom left. I have tried CSS, HTML. I tried 10 different solutions, ALL of which should have worked, but it stubbornly won't move.

Javier Canos

unread,
Jun 13, 2019, 2:05:39 PM6/13/19
to reCAPTCHA
Hi Cane,

I have used a variant of Andres Montero's solution, changing one div how said Stefano:

.g-recaptcha > div {
 margin-top: 1em
;

 text
-align: center;
 width
: auto !important;
 height
: auto !important;
}

It works for Chrome and Firefox, not in Opera. 

Other solution for all browsers, is use Marius's solution:

<div align="center" class="g-recaptcha" data-sitekey="your key code"></div>

It works for all browsers without change any css code.

Greetings.
Reply all
Reply to author
Forward
0 new messages