View Full Version : hovering alt tagin css

10-10-2007, 01:38 PM
Does anyone no how to make a hovering icon i when you hover over an image i have seen it done it almost looks like a styled alt tag bi need it to come up in random places i have tried hoover with transparencey in places but cant ge anything to work

10-10-2007, 02:41 PM
You can't do that with HTML/CSS, You will need to use JavaScript for that.
User a function that gets your mouse coordinates and then presents a box using the value of your mouse coordinates to locate the message box.

Should be something like this:

function showBox()
var x = window.event.clientX + document.scrollLeft;
var y = window.event.clientY + document.scrollTop;
var obj = document.getElementById("msgBox"); //msgBox = the id of the box
obj.style.left = x + "px";
obj.style.top = y + "px";
obj.style.display = "block";

10-10-2007, 03:19 PM
can you tll me how i would assign this to an object s or image if i put that in the css do i need to make the image a link befor it works