View Full Version : OT: CSS/DHTML Problem
Fyron
July 30th, 2004, 05:49 AM
http://usm.spaceempires.net/formations.php
When hovering the mouse over the name of a formation on the left, it should pop up an image of the formation in the box on the right. Unfortunately, this does not happen. The appropriate image pops up, but it is offset too much, and each successive image is offset even more. How would I fix this?
Will
July 30th, 2004, 06:13 AM
Instead of tying the image to each link, try updating the image src of "Default.png". It looks like the top of the image is lining up with the top of the link in Firefox. Testing in IE now...
--edit: Ok, I only have IE5.0, so it's completely broken. Can you blame me for only doing a mad rush to get patches then Firefox, instead of updating IE? http://forum.shrapnelgames.com/images/icons/icon7.gif
[ July 30, 2004, 05:16: Message edited by: Will ]
Fyron
July 30th, 2004, 06:14 AM
Does the same thing in IE.
How would I do that exactly?
edit:
--edit: Ok, I only have IE5.0, so it's completely broken. Can you blame me for only doing a mad rush to get patches then Firefox, instead of updating IE? [Smile] <font size="2" face="sans-serif, arial, verdana">IE is crap anyways. http://forum.shrapnelgames.com/images/icons/icon12.gif
[ July 30, 2004, 05:17: Message edited by: Imperator Fyron ]
Will
July 30th, 2004, 06:18 AM
I don't recall the exact syntax for the different DOMs of IE and Gecko, but it's something along the lines of using a mouseOver event to do imageName.src = "newImageFile.png";
I'll see if I can find it in any of my stuff.
Fyron
July 30th, 2004, 07:29 AM
It works! Thanks Will!
Will
July 30th, 2004, 07:57 AM
It does? In everything? I didn't think it would be that easy... meh.
For the curious, the syntax is </font><blockquote><font size="1" face="sans-serif, arial, verdana">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;"> document['imageName'].src = newImageSrc; </pre><hr /></blockquote><font size="2" face="sans-serif, arial, verdana">
Fyron
July 30th, 2004, 08:10 AM
Oh it was!
Of course, I still have the traditional problem of my tables appearing wonky in IE...
vBulletin® v3.8.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.