Prevent wrapping of span or div

后端 未结 5 1356
-上瘾入骨i
-上瘾入骨i 2020-12-22 21:24

I\'d like to put a group of div elements of fixed width into a container and have the horizontal scroll bar appeared. The div/span ele

5条回答
  •  醉话见心
    2020-12-22 21:54

    Looks like divs will not go outside of their body's width. Even within another div.

    I threw this up to test (without a doctype though) and it does not work as thought.

    .slideContainer {
        overflow-x: scroll;
    }
    .slide {
        float: left;
    }
    Some content Some content Some content Some content Some content Some content
    More content More content More content More content More content More content
    Even More content! Even More content! Even More content!

    What i am thinking is that the inner div's could be loaded through an iFrame, since that is another page and its content could be very wide.

提交回复
热议问题