Author Topic: change body background-image  (Read 5647 times)


  • Guest
change body background-image
« on: May 22, 2008, 01:18:57 PM »
Hello! I have following question:
How can I change my banner background-image (define in css), when I click a link to an other menue point.

width: 750px;
text-align: right;
margin-left: auto;
margin-right: auto;
height: 122px;
background-color: #FFFFFF;
background-repeat: no-repeat;
background-image: url(bg_back_1.jpg);         --> When somebody go to MenueLink2 - change it to bg_back_2.jpg


  • Guest
Re: change body background-image
« Reply #1 on: May 24, 2008, 07:23:36 AM »
You can create a 2nd template with bg_back_2.jpg and then assign this 2nd template to your menu2 page.

Offline Ruud

  • Posts: 3665
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: change body background-image
« Reply #2 on: May 24, 2008, 12:14:03 PM »
Doing this in CSS is almost imposible.
You could also set that css line from the index.php and use the PAGE_ID variable to create a filename.
Just make sure you have an image for all pages (or build some php that checks for file_exists).

I could think of more tricks like this.
i.e.: Use the keywords field to set the name from the backend (and don't use the dynamic keyword META tag).
or: select a different CSS on the PAGE_ID of the current page.

There are several examples on this forum.
Have a look at this:,9284.msg54875.html#msg54875