...

View Full Version : hovering alt tagin css



juxmedia
10-10-2007, 12: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

BarrMan
10-10-2007, 01: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";
}

juxmedia
10-10-2007, 02: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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum