BootStrap Form Verification FormValidation: Adjust the instance code of the feedback icon location, bootstrapform

Source: Internet
Author: User

BootStrap Form Verification FormValidation: Adjust the instance code of the feedback icon location, bootstrapform

In some cases, the feedback icon is incorrectly displayed. By default, Bootstrap defines the position of the feedback icon as follows:

.has-feedback .form-control-feedback {  top: 25px;  right: 0;}.form-horizontal .has-feedback .form-control-feedback {  top: 0;  right: 15px;}

With the custom value top and right attributes, you can adjust the feedback icon to its proper position.

Button Group

.btn-group .form-control-feedback {  top: 0;  right: -30px;} <div class="form-group">    <label class="col-xs-3 control-label">Gender</label>    <div class="col-xs-9">      <div class="btn-group" data-toggle="buttons">        <label class="btn btn-default">          <input type="radio" name="gender" value="male" /> Male        </label>        <label class="btn btn-default">          <input type="radio" name="gender" value="female" /> Female        </label>        <label class="btn btn-default">          <input type="radio" name="gender" value="other" /> Other        </label>      </div>    </div>  </div>

Input group and drop-down menu

#productForm .inputGroupContainer .form-control-feedback,#productForm .selectContainer .form-control-feedback {  top: 0;  right: -15px;} <div class="form-group">    <label class="col-xs-3 control-label">Amount</label>    <div class="col-xs-3 inputGroupContainer">      <div class="input-group">        <span class="input-group-addon">€</span>        <input type="text" class="form-control" name="amount" />      </div>    </div>  </div><div class="form-group">    <label class="col-xs-3 control-label">Color</label>    <div class="col-xs-3 selectContainer">      <select class="form-control" name="color">        <option value="">Choose a color</option>        <option value="blue">Blue</option>        <option value="green">Green</option>        <option value="red">Red</option>        <option value="yellow">Yellow</option>        <option value="white">White</option>      </select>    </div>  </div>

The above is the example code of the BootStrap Form Verification FormValidation adjustment feedback icon introduced by xiaobian. I hope it will help you. If you have any questions, please leave a message for me, the editor will reply to you in a timely manner. Thank you very much for your support for the help House website!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.