vertical-align with Bootstrap 3

后端 未结 25 2455
庸人自扰
庸人自扰 2020-11-21 05:34

I\'m using Twitter Bootstrap 3, and I have problems when I want to align vertically two div, for example — JSFiddle link:

相关标签:
25条回答
  • 2020-11-21 06:04

    Try this,

    .exe {
      font-size: 0;
    }
    
    .exe > [class*="col"] {
      display: inline-block;
      float: none;
      font-size: 14px;
      font-size: 1rem;
      vertical-align: middle;
    }
    <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet"/>
    <div class="row  exe">
       <div class="col-xs-5">
          <div style="height:5em;border:1px solid grey">Big</div>
       </div>
       <div class="col-xs-5">
           <div style="height:3em;border:1px solid red">Small</div>
       </div>
     </div>

    0 讨论(0)
提交回复
热议问题