简体   繁体   English

引导程序与列对齐

[英]Bootstrap alignment with columns

I am using Bootstrap CSS framework and have a row with 2 columns one with input field and label and other with input field with no label. 我正在使用Bootstrap CSS框架,并具有2列的行,其中一列具有输入字段和标签,而另一列具有输入字段而没有标签。 Here it's a jsfiddle . 这是一个jsfiddle

I want the second input field to be aligned with first input field. 我希望第二个输入字段与第一个输入字段对齐。 How can I achieve this? 我该如何实现?

Any help would be highly appreciated. 任何帮助将不胜感激。

<div class="container">
  <div class="row">
    <div class="col-sm-4">
        <label>Name</label>
            <input type="text" id="First Name">
    </div>
    <div class="col-sm-4">
      <input type="text" id="Last Name">
    </div>
  </div>

</div>

You can try this 你可以试试这个

 <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.css" rel="stylesheet"/> <div class="container"> <div class="row"> <div class="col-sm-4"> <label>Name</label> <input type="text" id="First Name"> </div> <div class="col-sm-4 align-self-end"> <input type="text" id="Last Name"> </div> </div> </div> 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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