How to make a DIV not wrap?

前端 未结 13 539
名媛妹妹
名媛妹妹 2020-11-30 19:32

I need to create a container DIV style that contains multiple other DIV\'s. It is asked that these DIV\'s wouldn\'t wrap if the browser window is resized to be narrow.

13条回答
  •  伪装坚强ぢ
    2020-11-30 20:21

    This worked for me:

    .container {
      display: inline-flex;
    }
    
    .slide {
      float: left;
    }
    something1
    something2
    something3
    something4

    https://css-tricks.com/snippets/css/a-guide-to-flexbox/

提交回复
热议问题