2013-10-14 106 views
0

右手边的背景图片出现问题。我预计它会在主要内容区域高度发生变化时垂直重复。背景图像不在列上重复

任何帮助,将不胜感激

这里是我的CSS

#rightcol { 
     background: #86030b url(images/leftcol-bg.jpg) top repeat-y; 
     height:100% !important; 
     text-align: center; 
     float: right; 
     width: 210px; 
     padding: 20px auto; 
     } 

Here is some more of my CSS 

    #content-wrapper { 
width: 930px; 
height: 100%; 
margin: 10px auto; 
} 

#content_main { 
height: 100%; 
padding: 14px; 
top: 0px; 
background: #fff; 
width: 692px; 
float: left; 
margin-bottom: 0px; 
} 

#rightcol { 
background: #86030b url(images/leftcol-bg.jpg) top repeat-y; 
height:100% !important; 
text-align: center; 
float: right; 
width: 210px; 
padding: 0px auto; 
    } 

感谢您的帮助迄今为止

+0

我刚做了一个示例[jsfiddle](http://jsfiddle.net/6XNcx/),它似乎很好地工作,垂直重复背景。 –

回答

0

试试这个:

#rightcol { 
    background-image:url('images/leftcol-bg.jpg'); 
    background-repeat:repeat-y; 
    height:100% !important; 
    text-align: center; 
    float: right; 
    width: 210px; 
    padding: 20px auto; 
    } 
0

你需要把你的主要内容和右列都在div是包装了,并把背景在那个div上。