S
sklett
I had this working at some point... then something happened.
I have a DataList that is set to repeat vertically, I have an asp:image in
each ItemTemplate and the whole thing comes together to work as a navigation
control. I noticed that I now have the smallest little gap between the
image and the top of the cells, 1-2 pixels.
I remember this used to be an issue of having the closing </td> tag on the
same line as the <img> tag or something like that. I have tried everything
to get this to work... but, no luck and it is now driving me insane.
Is there some place where I can read these tricks so that I can practice
swapping things around to get rid of the gap? Any ideas?
Here is what the code looks like that is generating the problem:
<aspataList id="dl_nav" runat="server" CellPadding="0">
<ItemTemplate>
<asp:HyperLink ID="navLink" Runat="server">
<asp:Image ID="navImg" Runat="server" />
</asp:HyperLink>
</ItemTemplate>
<SelectedItemTemplate>
<asp:HyperLink ID="navLink" Runat="server">
<asp:Image ID="navImg" Runat="server" />
</asp:HyperLink>
<div style="padding-left: 30px; background: #ffffff;">
<aspataList ID="navChildren" Runat="server" CellPadding="2"
OnItemDataBound="navChildren_ItemDataBound">
<ItemStyle CssClass="navSub" />
<ItemTemplate>
<asp:HyperLink ID="navSubLink" Runat="server" CssClass="navLink" />
</ItemTemplate>
</aspataList>
</div>
</SelectedItemTemplate>
</aspataList>
Any help will be GREATLY appreciated!
Thanks,
Steve
I have a DataList that is set to repeat vertically, I have an asp:image in
each ItemTemplate and the whole thing comes together to work as a navigation
control. I noticed that I now have the smallest little gap between the
image and the top of the cells, 1-2 pixels.
I remember this used to be an issue of having the closing </td> tag on the
same line as the <img> tag or something like that. I have tried everything
to get this to work... but, no luck and it is now driving me insane.
Is there some place where I can read these tricks so that I can practice
swapping things around to get rid of the gap? Any ideas?
Here is what the code looks like that is generating the problem:
<aspataList id="dl_nav" runat="server" CellPadding="0">
<ItemTemplate>
<asp:HyperLink ID="navLink" Runat="server">
<asp:Image ID="navImg" Runat="server" />
</asp:HyperLink>
</ItemTemplate>
<SelectedItemTemplate>
<asp:HyperLink ID="navLink" Runat="server">
<asp:Image ID="navImg" Runat="server" />
</asp:HyperLink>
<div style="padding-left: 30px; background: #ffffff;">
<aspataList ID="navChildren" Runat="server" CellPadding="2"
OnItemDataBound="navChildren_ItemDataBound">
<ItemStyle CssClass="navSub" />
<ItemTemplate>
<asp:HyperLink ID="navSubLink" Runat="server" CssClass="navLink" />
</ItemTemplate>
</aspataList>
</div>
</SelectedItemTemplate>
</aspataList>
Any help will be GREATLY appreciated!
Thanks,
Steve