简体   繁体   中英

Bootstrap form elements not aligned in horizontal form

I Have a horizontal modal form defined similarly to:

<div id="formElements" class="modal-body form-horizontal">
    <div id="catTemplate" class="form-group" style="display:none">
         <div class="controls col-sm-1">
              <a href="javascript:;"><span class="glyphicon glyphicon-minus"></span></a>
         </div>
         <div class="controls col-sm-7">
              <input class="form-control" placeholder="Category">
         </div>
         <div class="controls col-xm-3">
              <input class="form-control" type="number" min="0" max="100" style="width:100px;" placeholder="Weight %">
         </div>
    </div>
</div>  

But my link floats a little bit above the horizontal line of the other form elements. I attached a screenshot. Is there a way to properly align them?

减号图标未与其他表单元素对齐

You can use line-height See this link

Or you can use this one too

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM