Bootstrap NavBar with left, center or right aligned items

前端 未结 10 1226
旧巷少年郎
旧巷少年郎 2020-11-21 11:24

In Bootstrap, what is the most platform-friendly way to create a navigation bar that has Logo A on the left, menu items in the center, and Logo B on the rig

10条回答
  •  攒了一身酷
    2020-11-21 12:04

    Bootstrap 4 (as of alpha 6)

    Navbars are built with flexbox! Instead of floats, you’ll need flexbox and margin utilities.

    For Align Right use justify-content-end on the collapse div:

    
    

    Full example here: https://jsbin.com/kemawa/edit?output

提交回复
热议问题