reCAPTCHA box not being aligned correctly
css, html, recaptcha
Solution
I'm posting an updated solution to this question, as the accepted solution does not work with the new version 2.0 of Google's ReCaptcha.
Correct formatting is:
.g-recaptcha div { margin-left: auto; margin-right: auto;}
The new ReCaptcha uses a single `div` class called `g-recaptcha` and a number of unidentified and unclassified `div` children. This is probably the cleanest safest way to get the widget to center properly.
Problem
I can't get to align correctly the reCAPTCHA form on my registration page. Even if the `div` it is contained in has `text-align` set to `center`, it is displayed on the left of the page: While if I change its `align` via JavaScript (`document.getElementById("recaptcha_widget_div").align = "right"`) it works correctly (screenshot taken in the middle of the page): What am I doing wrong? Edit: here's a fiddle with the div and the entire CSS called in the page.