PDA

View Full Version : 2 background images



PitbullMean
Feb 6th, 2010, 01:28 AM
Is it possible to have 2 background images in the body?

cause one is a grunge style image. the other is a repeat so that it the background doesnt go to black when the pages exceed the size of the static image.

abduraooft
Feb 6th, 2010, 08:19 AM
You can't have two background images for a single element. However you may apply one to the html tag or add a wrapper <div> immediately after <body> tag.

PitbullMean
Feb 6th, 2010, 03:53 PM
Think you could write me out an example.

Keeping in mind that one of the images is static

body{
background: #000 url("images/background.jpg") no-repeat top center;
font: 12px Trebuchet MS, Verdana, Arial;
color: #000;
text-align: center;
}

/-----------------------------\
/-----------------------------\
/-----------------------------\
/-----------IMAGE------------\
/-----------------------------\
/-----------------------------\
/-----------------------------\
\--------Repeat Slice----------/