How can I add a line between two columns using Twitter Bootstraps grid system

前端 未结 7 2064
梦如初夏
梦如初夏 2020-12-23 17:07

Two column layout with a line in the middle.

[                      ] | [                      ]
[                      ] | [                      ]
[               


        
7条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-23 17:42

    Bootstrap 4 now comes with border utility classes. So if you are using Bootstrap 4, you can just use these classes on the columns that need them. For example, If you want a border between column A and column B, you would add the border-right class on column A.

    Here is a demo:

    
    
    
    Column A
    Column B


    Additional content demonstrating that the border stretches to accommodate the height of both columns.

提交回复
热议问题