Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change New Google Recaptcha (v2) Width

We've just started to implement the new google recaptcha as listed https://www.google.com/recaptcha/intro/index.html

However the new method seems to be contained within an iFrame rather than embedded into the page thus making applying CSS more difficult.

However we've got our form which is 400px wide so would like to have the recaptcha the same width.

Currently it looks like, however we'd like it the same with as the rest.

Does anybody know how to do this yet?

Thanks

recaptcha layout example

like image 331
owenmelbz Avatar asked Dec 29 '14 15:12

owenmelbz


People also ask

Is reCAPTCHA v2 better than v3?

Is reCAPTCHA v3 better than v2? Neither of them is good at blocking bots. While reCAPTCHA v3 is less intrusive than v2 for a user, it places a significant burden on the webmaster to determine when to let users through and when to block or challenge them. There's no right answer to this.

Can I run reCAPTCHA v2 and v3 on the same page?

Yes, you can use both reCAPTCHA (non-Enterprise version) and reCAPTCHA Enterprise. Typically the third party solution asks for your public key and either your secret key or your API key.


1 Answers

Here is a work around but not always a great one, depending on how much you scale it. Explanation can be found here: https://www.geekgoddess.com/how-to-resize-the-google-nocaptcha-recaptcha/

.g-recaptcha {     transform:scale(0.77);     transform-origin:0 0; } 

UPDATE: Google has added support for a smaller size via a parameter. Have a look at the docs - https://developers.google.com/recaptcha/docs/display#render_param

like image 115
colecmc Avatar answered Sep 19 '22 15:09

colecmc