How to display a list inline using Twitter's Bootstrap

前端 未结 9 1448
陌清茗
陌清茗 2021-01-29 21:46

I want to display a list inline using Bootstrap. Is there a class I can add from Bootstrap to achieve this?

9条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-29 22:01

    This solution works using Bootstrap v2, however in TBS3 the class INLINE. I haven't figured out what is the equivalent class (if there is one) in TBS3.

    This gentleman had a pretty good article of the differences between v2 and v3.

    http://mattduchek.com/differences-between-bootstrap-v2-3-and-v3-0/

    EDIT - use CSS to target the li elements to solve your problem as below

        { display: inline-block; }
    

    In my situation I was targeting the UL, instead of the LI

        nav ul li { display: inline-block; }
    

提交回复
热议问题