I use divs and background images, that way, the image isnt actually embedded directly in the HTML.
For example, in your html, insert a div container for your image and give it an id. Then within it, put your hyperlink code:
<div id="homepic"> <a href="index.php" title="Home"></a> </div>
Now reference the div container using its id in the stylesheet, and add a background image to it:
Code:
div#homepic {
position:absolute; top:92px; left:17px;
display:block;
width:166px; height:142px;
background: url("../images/style1pic.jpg") 0 0 no-repeat;
}
As you can see, the div container, and therefore the image too, is referenced in the stylesheet and not directly in the HTML.
To change the image, in your second stylesheet simply reference the same div container, but this time with a different image, and it will magically pop into view when you load your second stylesheet, like this:
Code:
div#homepic {
position:absolute; top:92px; left:17px;
display:block;
width:166px; height:142px;
background: url("../images/style2pic.jpg") 0 0 no-repeat;
}
Hope that helps
Bookmarks