Ummm. is there any way I can set an image to change based on a css style sheet?
Like say I wanted my main site logo to be the google logo on style sheet 1, and to be the yahoo logo on style sheet 2. How could I do this?
Ummm. is there any way I can set an image to change based on a css style sheet?
Like say I wanted my main site logo to be the google logo on style sheet 1, and to be the yahoo logo on style sheet 2. How could I do this?
Last edited by InsanityOnline; 12-23-2007 at 02:02 PM.
I think you could use layers in photoshop?
I'm not sure if you can change an <img> tag's image using css, but if you used a <div> or similar then you can. Let's say that both images are 100x100 pixels,
Stylesheet 1Code:<div class="image"></div>
Stylesheet 2Code:div.image { background-image: url('image1.png'); height: 100px; width: 100px; }
Something like that should work.Code:div.image { background-image: url('image2.png'); height: 100px; width: 100px; }
I used p.class combined with display:none.
kind of redundant but it works well.
You can use a small block of PHP to randomly select an image.
Except he wanted it in css, not php.
You can make a PHP stylesheet, makes it easier when you want to change colours, but you write it using CSS.