vertical-align with Bootstrap 3

后端 未结 25 2463
庸人自扰
庸人自扰 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条回答
  •  -上瘾入骨i
    2020-11-21 05:51

    This is my solution. Just add this class to your CSS content.

    .align-middle {
      display: flex;
      justify-content: center;
      align-items: center;
    }
    

    Then your HTML would look like this:

    Item

    Item

    Item

    .align-middle {
      display: flex;
      justify-content: center;
      align-items: center;
    }
    
      
        
        
        
        
    
        Title
      
      
        

    Item

    Item

    Item

提交回复
热议问题