Left & right align modal footer buttons in Bootstrap 4

后端 未结 9 1153
广开言路
广开言路 2021-01-31 01:21

Bootstrap 4 uses flex-box for it\'s modal footers. If I want two buttons, one on the left and one on the right, how do I get it to work properly?

The code below tries t

9条回答
  •  醉话见心
    2021-01-31 01:34

    The modal-footer is display:flex;. So the better way to align its elements (e.g. buttons) is by using flex rules. Bootstrap 4 provides new utilities classes to modify those flex rules (e.g. .justify-content-[modifier]). So I think a better option should be as follows:

    
    

    
    
    
    
    
    
    
    
    
    

提交回复
热议问题