I keep trying to use CSS and keep going back to tables in frustration. Well, here's to trying again.
I have graphic. I have code just below the graphic to display a couple of words. I used relative position to move the words up so they are displayed on top of the graphic. Below this, I have a paragraph. All this is in a table cell (someone else's design!)
This all works rather well, except for the space left by the text. Yes, it's displayed on top of the graphic, but there's a space below the graphic and above the paragraph where the text would have been. How can I eliminate that space?
Here's my code (in ASP.NET):
<table width="100%">
<tr>
<td colspan="2" align="center">
<div style="width:98%; text-align:center; padding:5px; color:White; background-color:#000080; font-size:x-large; font-weight:bold; font-family:Times New Roman;">
Contact</div>
</td>
</tr>
<tr>
<td valign="top" align="left" width="50%">
<asp:Image ID="postmail" runat="server" ImageUrl="images/contact-me-postal-mail.jpg" />
<div style="z-index:99; position:relative; top:-42px; left:100px;">By Mail:</div>
<div style="z-index:97; padding-left:25px; position:relative; top:-15px;">
<asp:Label ID="LabelHeader" runat="server" Text="Label" Font-Size="Small"></asp:Label>
</div>
</td>
<td valign="top" align="left" width="50%">
<asp:Image ID="email" runat="server" ImageUrl="images/contact-me-email.jpg" />
<div style="z-index:98; position:relative; top:-38px; left:100px;">By E-mail:</div>
<div style="padding-left:25px; position:relative; top:-15px;">
<asp:Label ID="LblIsEmail" runat="server"></asp:Label>
</div>
</td>
</tr>
</table>