Forum Moderators: not2easy

Message Too Old, No Replies

Replacing text w/ images... and keeping it clickable?

         

synotic

3:38 am on Jan 3, 2004 (gmt 0)

10+ Year Member



Hi, I am working on a site right now and wanted some advice. One feature of the site is that the user should be able to change entire stylesheet. This requires changing actual images through the site. So I have two questions...

What's the latest image replacement method? The browsers it needs to work in are IE:6 for PC, Safari, and Mozilla based browsers... It's a very specialized site so our browser requirements are too stiff.

Secondly, some of these images will need to be clickable. I tried using the fahrner image replacement method while hyperlinking the div but it didn't work too well.

So is there a known method for doing what I'm trying to achieve? Thanks for any help.

aevea

3:09 pm on Jan 3, 2004 (gmt 0)

10+ Year Member



If your going to replace the actual img's rather than background images, I think you're going to need a server-side scripting solution. Ultimately that's probably going to be easier than putting clickable divs over your background images, but this article has some interesting suggestions for css image mapping:
<http://www.alistapart.com/articles/imagemap/>

Adam

mipapage

3:31 pm on Jan 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



hyperlinking the div

This should work fine when done right. Can you post a snippet of the markkup and css in qiestion?

DrDoc

3:51 pm on Jan 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



hyperlinking the div

...should not work ;)
You cannot nest blocklevel elements inside inline elements. Instead of wrapping an anchor around your div, consider turning the anchor itself into a blocklevel element, using display:block

mipapage

7:15 pm on Jan 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Exactly, DrDoc, that's what I meant by 'done right' - I wanted to see the code, if it was <a..><div></div></a> I was going to suggest turning that inside out, and making 'a' block level. But I wanted to see it first before getting into too much detail.

DrDoc

7:48 pm on Jan 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Then we're on the same page :)