document.body.style.cssText="background:black url(images/Ilikethis.jpg) no-repeat fixed center center"
my website is: http://www.voxanova.com
The official way to do a static background is with style sheets. Here is the code:
You can use these basic values for positioning:
You can also use absolute positioning with x and y axis values, but these basic values are usually more than enough.
That code would be inserted in between the <head></head> of the document. Also, by looking at your site, I would suggest that you tone down your background color with some opacity to make the rest of the website more visible, otherwise you run into problems having trouble reading some of the text depending on where it lies on the screen.
Thanks for the help, I'll give it a try.
Gary, please realise that this effect will not work on all browsers, so it is best to test and make sure that your site is still usable if the background does scroll!
I am trying to make the background image fixed, and not tile when the pixel settings are high. I want a certain look and it is messed up if the image tiles. I know that certain techniques are not compatiple with all browsers, but isn't it most important to get it right with msie and netscape. I am probably ignorant about this, but it seems that the people I know use one of the two. Also, I have seen sites get the effect I am looking for by cutting the image into several pieces and arranging them in a table. This is way beyond my experience in image editing, but I have been looking for information on how to accomplish it.
Thanks for your reply.
Use the CSS technique.
I have used that one before and I know it works with all browsers 4.0+
(NN, IE and even Opera too)
IE 3.0 is another issue though
I have successfully used the css as outlined by cckrocks. It is accomplishing what I wanted it to. Thanks for all the input.