make a single row of divs with horizontal scroll bars

前端 未结 4 1909
[愿得一人]
[愿得一人] 2021-02-06 04:18

Ok so I thought I had this fixed using white-space:no-wrap it worked in chrome but nothing else.

I have something like this:

4条回答
  •  花落未央
    2021-02-06 05:15

    Write like this:

    .outer{
        width:400px;
        overflow:auto;
        white-space:nowrap;
    }
    .outer li{
        display: inline-block;
        *display: inline;/*For IE7*/
        *zoom:1;/*For IE7*/
        vertical-align:top;
        width:40px;
        margin-right:20px;
        background:red;
        white-space:normal;
    }
    

    Check this http://jsfiddle.net/ZrpHv/

提交回复
热议问题