I think it's going to come down to how many images/pages you have and what
you are most comfortable maintaining (or handing off), and how things might
change down the road. 

With JavaScript (or server-side scripting), you can parse the file name from
the URL and use that to pick the image and attach it as the background image
to the page. As long as the background images and page file names are
consistent, your good. You don't even need to worry about the ID attribute
of the background. (But, you do have the ID as a nifty way to specify an
alternate background, in cases of mismatches.)

if, on the other hand, you're dealing with a fairly small site (< 20 pages
or so), I'd go with Ray's recommendation. Create a separate CSS file for the
background images and stack the definitions in a list...

body#home     {background-image: url(images/bg_home.jpg) left top
no-repeat;)
body#about    {background-image: url(images/bg_about.jpg) left top
no-repeat;)
body#services {background-image: url(images/bg_services.jpg) left top
no-repeat;)
body#location {background-image: url(images/bg_location.jpg) left top
no-repeat;)
body#contact  {background-image: url(images/bg_contact.jpg) left top
no-repeat;)

This also has the added advantage of mix-and-matching backgrounds. That is,
client says, "hey, put the location background on the contact page". No
problem...

body#contact  {background-image: url(images/bg_location.jpg) left top
no-repeat;)

...Rob

________________________________________
Rob Emenecker @ Hairy Dog Digital
410.694.3575 (arf) || 410.694.3550 (fax)
www.hairydogdigital.com
 


______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to