Absolutely positioned div on right causing scrollbar when the left doesn't

后端 未结 11 615
被撕碎了的回忆
被撕碎了的回忆 2020-12-31 07:02

I\'m trying to \"flank\" a centered div with some design elements that are absolutely positioned outside the main div\'s width. I\'m getting a scroll bar due to the element

11条回答
  •  执念已碎
    2020-12-31 07:35

    I have a solution that doesn't work in IE7/IE6, but seems to be fine everywhere else.

    Create wrapper (#bodyInner) around everything inside your <body> tag.

    Apply this CSS rule:

    #bodyInner {
        width:100%;
        overflow:hidden;
        min-width:960px;
        }
    

    Too bad you can't just apply this on the <body> element.

提交回复
热议问题