View Full Version : background image problem
fatcat
Jan-06-2009, 12:53 PM
Hi,
I need help with a background image. I have the image as a border on the left side of all my pages, but I want to add it to the right side as well. I've tried a couple of different ideas of code, but can't get it to work. Does anyone know how to do it? My site is www.khiggins.smugmugm.com (http://www.khiggins.smugmugm.com). Thanks.
jfriend
Jan-06-2009, 04:05 PM
Try this CSS. I only made it active on your homepage, but you could make it active everywhere if you want:
.homepage #extraDiv2 {
display:block;
background-attachment: scroll;
background-image:
url(http://khiggins.smugmug.com/photos/449507068_yReRB-L.jpg);
background-repeat: repeat-y;
background-position: top right;
width:95px;
height:800px;
position:absolute;
right:0;
top:0;
z-index:-99;
}
The only thing that isn't perfect is that we have to declare a height here to get the repeat to extend to the bottom and you want it to be "about" the height of the actual page, but we don't know the height of all the pages this could be on. It works fine for the homepage. I've read about using height:100% to make it stretch the whole length of the page, but that isn't working for me in FF3.
fatcat
Jan-06-2009, 11:43 PM
Wow, thanks! That totally worked. The only page it isn't long enough on is my guestbook page. Do you have any suggestions on how to get it to stretch to the bottom on that page?
jfriend
Jan-06-2009, 11:46 PM
Wow, thanks! That totally worked. The only page it isn't long enough on is my guestbook page. Do you have any suggestions on how to get it to stretch to the bottom on that page?
I'm still looking for a more general purpose solution. For now, you could just set the height value in the extraDiv2 to be tall enough for the guestbook. that will force all your other pages to be that tall too, but that's probably OK for now.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.