c# - Alignment of Google ReCaptcha v2 bootstrap -
i wondering if issue having. have form in which, putting recaptcha v2. no matter try can not recaptcha in correct alignment rest of form directly underneath text boxes writing left. grateful if me solve issuse
the form
@using (html.beginform("register", "account", formmethod.post, new { @class = "form-horizontal", role = "form" })) { @html.antiforgerytoken() @html.validationsummary("", new { @class = "text-danger" }) <div class="form-group"> @html.labelfor(m => m.firstname, new { @class = "col-md-2 control-label" }) <div class="col-md-10"> @html.textboxfor(m => m.firstname, new { @class = "form-control" }) </div> </div> <div class="form-group"> @html.labelfor(m => m.email, new { @class = "col-md-2 control-label" }) <div class="col-md-10"> @html.textboxfor(m => m.email, new { @class = "form-control" }) </div> </div> <div class="form-group"> @html.labelfor(m => m.password, new { @class = "col-md-2 control-label" }) <div class="col-md-10"> @html.passwordfor(m => m.password, new { @class = "form-control" }) </div> </div> <div class="form-group"> @html.labelfor(m => m.confirmpassword, new { @class = "col-md-2 control-label" }) <div class="col-md-10"> @html.passwordfor(m => m.confirmpassword, new { @class = "form-control" }) </div> </div> <style> div.g-recaptcha { left: 0px; width: 304px; } </style> <div class="form-group"> human <div class="col-md-10"> <div align="center" class="g-recaptcha" data-sitekey="sitekey"></div> </div> </div> <div class="form-group"> <div class="col-md-offset-2 col-md-10"> <input type="submit" class="btn btn-default" value="register" /> </div> </div> }
an image of happening.
richards approach
you've not styled label. put inside col-md-2 push content over. need remove align="center"
, , possibly need add form-control-static class of captcha.
<div class="form-group"> <label class="col-md-2 control-label">are human</label> <div class="col-md-10"> <div class="form-control-static g-recaptcha" data-sitekey="sitekey"></div> </div> </div>
Comments
Post a Comment