How to make a DIV not wrap?

前端 未结 13 571
名媛妹妹
名媛妹妹 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:31

    If I don't want to define a minimal width because I don't know the amount of elements the only thing that worked to me was:

    display: inline-block;
    white-space: nowrap;
    

    But only in Chrome and Safari :/

提交回复
热议问题