set width of inner div on scrollable element to 100% of scrollable width

后端 未结 5 1076
小蘑菇
小蘑菇 2021-01-02 13:10

How do I get the width of this inner content div to be equal to the width of the scrollable area?

5条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-02 13:34

    Add to .content class

    overflow: auto;
    

    Updated fiddle here: http://jsfiddle.net/XBVsR/11/

    Do remember that this would affect all elements with class .content. You might wanna give it another class name too.

提交回复
热议问题