I’ve been searching and trying several different variations of CSS to get my background for the content area to repeat vertically with no success.
The code below is what I am currently using, which does not display the background at all. Using margin-bottom: -35000px; and padding-bottom: 35000px; was the closest in displaying the background, but of course a very long page. Using overflow: hidden; had varying affects in different browsers.
I actually tested that code before posting and it worked, but it may not work in all browsers. (I’m not very good at full heights). What browser are you using?
Things will be different when you have some content on that page anyway. If you want the background image to span the full height of the window, I’d suggest putting it on the <body> element anyway. Then you can forget about all the 100% heights, which are tricky anyway.
I’ve viewed it in FF3.6, IE8, Safari 5.0.4 and Chrome’s latest (10.0…), and they all display the same.
I’m using the following doctype.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
I’m adding this code as part of customizing X-Cart to my site design. I don’t think there would be anything causing the issue.
It would be better to use a modern doctype, such as
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
or
<!DOCTYPE html>
But anyway, the transitional doctype doesn’t change this for me.
Could I just check: view what in? If you copy the code I pasted above into a .html file, place it on your desktop (along with the background image) and open it in your browsers, what do you see? Doing that, the background works for me.