speedy33417 Posted June 21, 2008 Share Posted June 21, 2008 I mainly use IE, but I'd like my script to do the same thing on Safari and Firefox, too. <img border="0" src="images/img.jpg" width="60" height="54" alt="Something" /> In IE when I hover over the image I get a the "Something" text show up, but not in Safari or Firefox. How do I write this code tho work on all 3 browsers? Quote Link to comment Share on other sites More sharing options...
haku Posted June 22, 2008 Share Posted June 22, 2008 To answer your question, add title="something" to your tag. For a piece of advice, its a good idea to design your sites in either firefox or safari, and then after they work tweak them for Internet Explorer. IE is not a very good browser in that it works on its own set of rules rather than the established rules of the web. That means it does things differently than other browsers, which do things the proper way. So if you are coding your site for IE, it's quite difficult to adjust your code for other browsers and get it to work the same across browsers. It's much easier to start in one of the other browsers, then make it work for IE after that. There are special IE tweaks (called conditional comments) specifically for that. Good luck! Quote Link to comment Share on other sites More sharing options...
dannyb785 Posted June 23, 2008 Share Posted June 23, 2008 ^ in a nutshell... alt="" wasn't original designed to be displayed when you hover over an image. alt is for when text can't be displayed, the alt value displays. FF and others do it right by not showing alt things, so, like the above poster said, you need to have it in the title="" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.