Validation errors move button right - CSS -
.password-reset { padding: 40px 50px 0; float: left; } .form-field { float: left; font-size: 18px; color: #fff; margin-right: 15px; } .form-field--wide { width: 100%; float: left; margin-bottom: 20px; } .form-field label { margin-bottom: 3px; width: 100%; display: block; color: black; } .form-field input { padding: 10px; color: #000; width: 245px; float: left; } .form-field input.error { color: #ed1b2e; } .form-field--half { width: 48%; margin: 0; } .form-field--half input { width: 100%; } .form-field--repos { float: right; } .form-error { color: #ed1b2e; font-size: 14px; float: left; margin: 5px 3px 0 0; display: inline-block; } .form-error.alert { clear: both; } .form-error ul { list-style: none; padding: 0; margin: 0; } .form-error li { /*display: inline-block;*/ margin-right: 3px; } .form-field--wide .form-error { font-size: 18px; color: #ed1b2e; padding: 0 10px; font-size: 18px; width: 180px; float: left; line-height: normal; margin-top: 0; }
<div class="password-reset"> <form id="passwordreminderform" action="/service/public/passwordreminder.do?sitelanguage=en" method="post"> <div class="form-field form-field--half"> <label for="user">username</label> <div class="input error-input"> <input id="passwordreminderformusername" name="username" value="" type="text"> </div> </div> <!-- .form-field --> <div class="form-field form-field--half form-field--repos"> <label for="email">e-mail</label> <div class="input error-input"> <input style="width: 120%;" id="passwordreminderformemail" name="email" value="" type="text"> </div> </div> <!-- .form-field --> <div class="verification-messages message--red"> <div id="passwordreminderform.errors" class="form-error">"e-mail" must set <br>"username" must set</div> </div> <input class="btn btn--top-offset js-validate-image submit-form" value="remind me" type="submit"> <input name="_csrf" value="7035c910-22bf-49b9-b0b3-facd9d460fbd" type="hidden"> </form> </div>
i have provided css , html code. see problem validation errors move "remind me" button right, should on left side. how can achieve this? suggestions? provide button styles if needed. link fiddle
you need first clear left inherited , apply float float left button using css here is
.form-submit-button{ clear:left; float:left; }
<input class="btn btn--top-offset js-validate-image submit-form form-submit-button" value="remind me" type="submit">
here js fiddle
Comments
Post a Comment