Welcome, Guest. Please login or register.
Did you miss your activation email?
May 27, 2012, 03:28:44 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155555 Posts in 21715 Topics by 7737 Members
Latest Member: gx-world
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: change body background-image  (Read 2533 times)
Fitzi

Offline Offline

Posts: 7


« on: May 22, 2008, 12: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

Offline Offline

Posts: 64


WWW
« Reply #1 on: May 24, 2008, 06: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

www.FolioPages.com - Web design & solutions
Ruud
WebsiteBaker Org e.V.

Offline Offline

Posts: 2298



WWW
« Reply #2 on: May 24, 2008, 11:14:03 AM »

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: http://www.websitebaker2.org/forum/index.php/topic,9284.msg54875.html#msg54875

Ruud
Logged

Professional WebsiteBaker Solutions
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!