View Full Version : Background Picture
BigStu
January 29th, 2007, 08:39 PM
Probably an easy question, but cant figure it out. I'm useing Frontpage 2003 creating a website. I want to add a background picture to the page but I dont want that picture to repeat if the page ends up longer than the pic. Is that possible?
Aries7
January 29th, 2007, 08:42 PM
yes...
are you using plain old HTML or are you using CSS in there too?
30111987
January 29th, 2007, 08:45 PM
you could make the pic stay in position as the page is scrolled
<style type="text/css">
body
{
background-image:
url('background.jpg');
background-repeat:
no-repeat;
background-attachment:
fixed
}
</style>
BigStu
January 29th, 2007, 08:48 PM
Just plain old html right now. I dont want the pic to stay in position either because its part of the header.
Aries7
January 29th, 2007, 08:49 PM
in that case, just use...
<style type="text/css">
body
{
background-image: url('background.jpg');
background-repeat: no-repeat;
}
</style>
Put that in the <head> of your page, and you should be fine.
BigStu
January 29th, 2007, 09:18 PM
Ok next problem. It needs to repeat across the page, but not down the page. its a 1x800 pic
Aries7
January 29th, 2007, 09:21 PM
change...
background-repeat: no-repeat;
to...
background-repeat: x-repeat;
i think...my styles memory is rusty
BigStu
January 29th, 2007, 09:26 PM
That worked, but its still repeating down the page
Aries7
January 29th, 2007, 09:28 PM
had it backwards...
background-repeat: repeat-x;
BigStu
January 29th, 2007, 09:34 PM
That worked. Thanks for the help
Aries7
January 29th, 2007, 09:39 PM
no problem
Buzz
January 30th, 2007, 01:27 AM
background: #fff url(images/background.gif) repeat-x 0 0;
or
background: #fff url(images/background.gif) repeat-x left top;
Shorthand.