I have a plain colored background on one of my sites and I was wondering how can I change it to a small image (1px by 1px - to repeat itself) that looks like a nice texture. The current css for the section I want is. #wrapper { width: 800px; margin-left: auto; margin-right: auto; background-color: #404864; } So how would I do this?
#wrapper { width: 800px; margin-left: auto; margin-right: auto; background:url(myimage.gif) #404864; } This will allow the background to repeat throughout #wrapper. If the image doesn't exist or isn't loaded, the background color of #404864 will take its place.
#wrapper { width: 800px; margin-left: auto; margin-right: auto; background: url(images/imagename.gif) repeat; }
Shorthand: #wrapper { width: 800px; margin: 0 auto; background: url(images/your_image.gif); } By default, the background image will be repeated so, a "repeat" value after image's url will not affect the ending result.