Forum Moderators: not2easy
So, here goes:
I have an image I'd like to repeat from left to right. It's 5px wide by 1000px tall. The upper portion is a texture and fades to a solid color 3/4 the way down. Now, should the page height exceed the images height I'd like for a solid background color to come into effect down the rest of the page when scrolling rather than the image repeat itself on another row.
Possible? Basically it'd be a 'fixed repeat-x' in a sense, but that doesn't seem to do it.
Thanks..
[edited by: Atomic_Justice at 2:20 pm (utc) on Jan. 25, 2009]
You can apply both a solid color and an background image, the solid color will be used outside of the area the image occupies.
Aside of that whats the code you're having trouble with ? In what browser ?
Are you using a fixed background attachment ? Many errors we see with that are that the background image is positioned against the viewport, not the element it is applied to.
[w3.org...]
has an example of what you seek:
body {
background: red url("pendant.png");
background-repeat: repeat-y;
background-attachment: fixed;
}
Note it's applied to the body: this helps prevent a lot of the confusion with fixed attachment.
I appreciate the time for the advice here. I will remember this as a reference.
What I was attempting at first was: #333333 url(img) fixed repeat-x;
I was close :)
Thank you