reCaptcha v3 badge ~ how to change position

2,503 views
Skip to first unread message

Romain Gibassier

unread,
Jul 18, 2019, 3:59:25 PM7/18/19
to reCAPTCHA
Hi,
I didnt find any documentation on how to influence recaptcha badge postion for the version 3.
I would like to change the z-index since the badge is hidden behind some content on the page.

Best,
Romain

Gwangseok O

unread,
Jul 19, 2019, 5:53:32 PM7/19/19
to reCAPTCHA
.grecaptcha-badge {
  z-index: [number];
}

or 

.grecaptcha-badge:hover {
  z-index: [number];
}


2019년 7월 19일 금요일 오전 4시 59분 25초 UTC+9, Romain Gibassier 님의 말:

Romain Gibassier

unread,
Jul 22, 2019, 6:14:03 PM7/22/19
to reCAPTCHA
Found two ways to position google captcha, first one permit to place wherever you want the captcha but it brokes the animation and I was forced to use fixed postion, so not really modulable :
id = grecaptcha.render('g-recaptcha', {
sitekey: captchaId,
size: 'invisible',
badge: 'inline'
});


return id;
});

Second one more convenient if you dont need to place it somewhere preicse :
:global(.grecaptcha-badge) {
z-index: var(--z-index-9) !important; /* stylelint-disable-line */
}
Reply all
Reply to author
Forward
0 new messages