WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.8 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • General Community »
  • Global WebsiteBaker 2.8.x discussion »
  • change body background-image
  • Print
Pages: [1]   Go Down

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

Fitzi

  • 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.


CSS:
#BANNER {
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
}
Logged

hrioo

  • 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.
Logged

Offline Ruud

  • Posts: 3671
  • 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: https://forum.WebsiteBaker.org/index.php/topic,9284.msg54875.html#msg54875

Ruud
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • General Community »
  • Global WebsiteBaker 2.8.x discussion »
  • change body background-image
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2