We have a large database that is within a table and covers multiple departments. The other departments are asking if when their department is selected, can their own branding show as the background image, instead of this general one (top_bg.jpg) from the CSS below.
Hello Nikolette.
I am unsure how to do this concerning CSS. But if you put in a little PHP (if department_selected { //use background image }. That would allow you to do this upon load of the website. If you need to change the background once something is clicked jquery or javascript would be able to help you in regards to this. using the .click() function.
Hopefully someone else can come by and explain this better
What it actually is, is a search result from metadata. Anyone can see the results, not just, for example, Dallas, Richmond or Chicago. If I have a category named “rd=region_dallas_photos,” one named “rd=region_richmond_photos” and one more named “rd=region_chicago_photos” then I need a different background image based on the different categories of metadata selected.
So, for Dallas it might be (I’m revising my previous code):
To add the class in the body, optimally you’d have a function that assigns the body class to the right page dynamically. That can be done server-side or client-side, but with CSS alone, it won’t be possible.