Force horizontal expansion

后端 未结 2 1791
独厮守ぢ
独厮守ぢ 2020-12-28 19:17

For a sort of thumbnail horizontal sliding viewer

How can I make the divs inside the horizontal scrolling divs force the scrolling div horizontally, instead of reach

2条回答
  •  难免孤独
    2020-12-28 20:09

    You don't need float and display:inline-block, and floats won't do it.. so you have to remove the float rule, (add a workaround for IE7 and below *) - When float is present browsers ignore the display property

    .box{
        width: 100px;
        height: 100px;
        border: solid 1px black;
        display: inline-block;
    }
    
    .box {display: inline !ie7;} /* to make it work in IE7 and below */
    

    with white-space: nowrap on the inner div

    etc..

提交回复
热议问题