July 20, 200917 yr hello all! well i have two questions... 1) how do you repeat something along the top of the body and the bottom... for example. something like body { background:url/image.jpeg repeat-x top left; } will repeat the pic alway across the whole body, i understand this. but how do i do that with the bottom of the screen for a footer style pic across the body AS WELL? (maybe a bad way of explaining, but i hope you get what i mean? an example of this, is on this website link where the top and bottom spans the whole page) and 2)how do i make it, so that only the content of my website scrolls and the background stays in the same position? like for example i was looking at http://darrenpinder.co.uk/ and noticed that his background image stays in the same place, but the content scrolls. it's a nice trick. i would really appreciate your help on this. thanks very much.
July 20, 200917 yr Hi, 1) To have a background image repeating top and bottom, simply have two divs one for the header and one for the footer, set each background to repeat-x. As long as you don't set a width or the divs are within another div with a set width then the background image will repeat the whole of the browser window. 2) Within the body or the div that contains the main background image add background-attachment: fixed; Hope this helps
Create an account or sign in to comment