Log in

View Full Version : Spacing problem



kentmcpherson
09-13-2005, 07:53 PM
I'm trying to set up a tabbed menu with a horizontal rule directly underneath. The code excerpt I have is:

<body topmargin="0" bottommargin="0" style="text-align: center">&nbsp;<p>&nbsp;</p>

<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="bottom"><a href="index.htm"><img border="0" src="images/Home_Btn0.jpg" width="75" height="50"></a></td>
<td valign="bottom"><a href="weddings.htm"><img border="0" src="images/WeddingNews_Btn0.jpg" width="75" height="50"></a></td>
<td valign="bottom"><a href="photo_album.htm"><img border="0" src="images/PhotoAlbum_Btn0.jpg" width="75" height="50"></a></td>
<td valign="bottom"><a href="smallgroup.htm"><img border="0" src="images/SmallGroup_Btn1.jpg" width="75" height="50"></a></td>
<td valign="center"><a href="feedback.htm"><img border="0" src="images/Feedback_Btn0.jpg" width="75" height="50"></a></td>
</tr>
</table>
<hr color="#008000" size="20" style="margin-top: 0; margin-bottom: 0">

</body>

There is a space between the tabs and rule in IE6 but not in Firefox. Any ideas why?

jscheuer1
09-13-2005, 09:53 PM
Well, in tests here, I get a slight space in both browsers using just the word 'Hi' in a single celled table with your hr below it but, the IE gap is larger. In any event, giving either the hr a negative top margin or the table a negative bottom margin will close the gap. If this messes up the positioning in FF you can use the !important hack:

<table style="margin-bottom:0!important;margin-bottom:-8px;">If you are wanting to avoid problems with Opera and possibly other browsers, including IE Mac, look into more specific hacks at quirksmode.org.