Previous Thread
Next Thread
Print Thread
Rate Thread
#226770 10/25/2002 8:03 PM
Joined: Apr 2002
Posts: 68
Power User
Power User
Offline
Joined: Apr 2002
Posts: 68
Is it possible to use css, and have it be able to change an image on the page based on that stylesheet?

I have dark, light and everything in between of stylesheets, and I wanted to give each stylesheet an image of its own. For the forum logo. And having a white logo on a dark page doesn't work

Just wondering if there’s a way..


"We're sorta like the 7-11. We're not always doin' business, but we're always open"
Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
If you give that particular <td> it's own class, you can set background images to anything you like based on the stylesheet in use. Something like:

background-image: url(https://www.ubbdev.com/threads/php/images/blueblam_r15_c10.gif);

is what we use in part of the stylesheet here If we had a green one to choose from as well, the stylesheet would call a green image to do the same thing


- Allen wavey
- What Drives You?
Joined: Jul 2002
Posts: 135
Journeyman
Journeyman
Joined: Jul 2002
Posts: 135
I figured out how to get it in the CSS but how do you call it back in the header?

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
Create a logo for each style sheet, then in your style sheets add a logo class (I use logo-left, but you can call it anything you want). In that class you need a statement like this one



replacing the domain, directory, and image names for your site. All you have to do is change the file name in each style sheet, but use the same class name, and you can have a different logo load for each style sheet.

I set up templates for my logo. Check out the first post in this link. You don't have to do what I've done, but it might give you some ideas.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240430)