100% width bg images not extending on horizontal scroll

前端 未结 4 618
猫巷女王i
猫巷女王i 2020-12-03 17:20

I\'m noticing this issue. I made a quick screen capture to demonstrate: http://dl.dropbox.com/u/904456/2010-06-14_2323.swf

Basically when you have a min-width set an

4条回答
  •  半阙折子戏
    2020-12-03 18:13

    I think you are talking about a problem where 100% width is equal to the width of viewport not the content to make the background go to the width of content you should add min-width to the background div such as:

    .background
    {
        width:100%;
        min-width:960px; /* The width of the content */
        background:url(your-pretty-background.png);
    }
    
    .content
    {
        width:960px;
    }
    

    It works !

提交回复
热议问题