HTML Code that locks a background image for a website?

Does anyone know of an html code that I can copy and paste in order to lock an image to use as a background. The problem Im having is that when I scroll up/down left/right the background scrolls as well along with the content. I want to be able to scroll and have the bacground be in a fixed centered postion and only have the content scroll. Pretty much the same thing as myspace. Im using macromedia dreamweaver mx to create this site, so I have access to the background coding. Any help about this topic and/or the html code to lock the background would be greatly appreciated. Thank You.

Public Comments

  1. <style type="text/css"> body { background: #fff url(image.jpg) no-repeat fixed; }
  2. <body background="picture.jpg" style="background-attachment: fixed">
Powered by Yahoo! Answers