Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mouse handler inserts gap below image? 2

Status
Not open for further replies.

Alt255

Programmer
May 14, 1999
1,846
US
This isn't exactly my cup of tea but my boses have decided that I'm suited for the work.

I have a navigation bar with a series of images stacked in the cells of a table. Onmouseover and onmouseout swaps images. I keep ending up with a gap between the images in two of the cells.

This is all I'm doing:
Code:
<a href="about_us.htm">
<img border="0" onmouseover="document.contactButton.src='imgs/e_contact_u.gif'" onclick="document.contactButton.src='imgs/e_contact_d.gif'" onmouseout="document.contactButton.src='imgs/e_contact.gif'" src="imgs/e_contact.gif" name="contactButton" width="165" height="90">

Would one of you gurus take a look at and let me know what I'm doing wrong?

It's probably something incredibly simple. Thanks in advance.


Add water (makes its own sauce).
 
Thanks for the fast reply! I removed most of the whitespace (leaving a bit for legibility) and I get the same gap after the image.

Note that I have already recreated the tables from scratch, checked the images, regenerated the images, resized the images and anything else I could think of to try... but the result has always been the same. When I remove the onmouse...etc, the mis-aligned image slides neatly into place.

Any thoughts?

Add water (makes its own sauce).
 
Changing this:
Code:
<td width="165" height="90" valign="bottom">
<a href="about_us.htm">
<img border="0" onmouseover="document.contactButton.src='imgs/e_contact_u.gif'" onclick="document.contactButton.src='imgs/e_contact_d.gif'" onmouseout="document.contactButton.src='imgs/e_contact.gif'" src="imgs/e_contact.gif" name="contactButton" width="165" height="90">
</a>
   </td>
to a version without whitespace (like Dan suggested)
Code:
<td width="165" height="90" valign="bottom"><a href="about_us.htm"><img border="0" onmouseover="document.contactButton.src='imgs/e_contact_u.gif'" onclick="document.contactButton.src='imgs/e_contact_d.gif'" onmouseout="document.contactButton.src='imgs/e_contact.gif'" src="imgs/e_contact.gif" name="contactButton" width="165" height="90"></a></td>
makes it work in my Mozilla.
 
Sorry I misunderstood about the whitespace. Simple things baffle me.

Here's a star for both of you for the quick replies and the professional help.


Add water (makes its own sauce).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top