fixed background?

liunx

Guest
I'm trying to help a friend build a web page for his band, and he wants the background to be fixed and stretched to fill the whole window. It's not a "tile-able" image (It's a photo), so it kinda needs to be fixed and stretched or else it will look stupid. My friend is very picky and he "must have this picture... dude!" so if anyone knows the code to fix and/or stretch background images, please let me know! Thanks a bunch!<!--content-->Easy to do. Just follow these steps, where you will replace picname with the filename of the photo.<br />
<br />
Before you start:<br />
1) If you are using a background attribute in the <body> tag, remove it completely.<br />
2) Make sure you have a head section separate from a body seciton, using <head></head><body></body>.<br />
<br />
Putting the code in:<br />
<br />
1) Copy and paste the following into the head section of your page.<br />
<br />
<style type="text/css"><br />
body{<br />
background-image:picname;<br />
background-attachment:fixed;<br />
background-repeat:no-repeat;<br />
}<br />
</style><br />
<br />
<br />
2) You will have to resize the picture to your liking manually, using programs such as photoshop or paint. Just open the picture in paint, edit>select all, image>stretch/sckew, and put in the same number value for the horizontal/vertical % increases. Sorry I don't think there is a way to resize background images before putting them on.<br />
<br />
<br />
-----------<br />
That is all, I hope this helps.<br />
-----------<!--content-->I think<br />
background-image: picname;<br />
should be<br />
background-image:url(someimage.png);<br />
<br />
:)<!--content-->oops, thanks eddyd84 - forgot about the url part<!--content-->
 
Back
Top