Menu Template Problem

K

Kenneth Chan

I have created a menu with the following code:

<asp:Menu ID="Menu1"
runat="server" BackColor="#F7F6F3"
Font-Names="Verdana"
Font-Size="X-Small" Orientation="Horizontal"
BorderWidth="0px"
StaticEnableDefaultPopOutImage="True"
DynamicPopOutImageUrl="~/Images/Menu/Arrow.gif" StaticSubMenuIndent=""
Height="25px" DisappearAfter="600">
<StaticMenuItemStyle
HorizontalPadding="0px" VerticalPadding="0px" ItemSpacing="0px"
Font-Bold="True" />
<DynamicMenuItemStyle
HorizontalPadding="0px" VerticalPadding="0px" ItemSpacing="0px"
Font-Bold="False" />
<Items>
<asp:MenuItem
Text="Help" Value="Help">
<asp:MenuItem
Text="Contents" Value="Contents"></asp:MenuItem>
<asp:MenuItem
Text="Frequently Asked Questions" Value="Frequently Asked
Questions"></asp:MenuItem>
<asp:MenuItem
Text="Online Support" Value="Online Support"></asp:MenuItem>
</asp:MenuItem>
</Items>
<DynamicItemTemplate>
<asp:LinkButton
ID="LinkButton1" runat="server" Width="100%"
PostBackUrl='<%#Eval("NavigateURL")%>' style="padding-right: 10px;
padding-left: 20px; padding-bottom: 5px; padding-top: 5px;
border-top: 1px solid; border-right: 1px solid; border-left: 1px solid;
border-bottom: 1px solid;
text-align: left; margin: 0px;" ><%# Eval("Text") %></asp:LinkButton>
</DynamicItemTemplate>
<StaticItemTemplate>
<asp:Table ID="Table1"
runat="server" BackImageUrl="~/Images/Menu/StaticTab01.gif"
BorderWidth="0px"
Width="100%" Height="25px" >
<asp:TableRow
runat="server" Height="4px">
</asp:TableRow>
<asp:TableRow
runat="server" BorderWidth="0px" HorizontalAlign="Left">
<asp:TableCell
runat="server" Width="12px"></asp:TableCell>
<asp:TableCell
runat="server" HorizontalAlign="Center"><%# Eval("Text") %></asp:TableCell>
<asp:TableCell
runat="server" Width="12px"></asp:TableCell>
</asp:TableRow>
</asp:Table>
</StaticItemTemplate>
<DynamicMenuStyle
BackColor="#FCFCFC" BorderColor="Silver" BorderStyle="Solid"
BorderWidth="1px" />
<DynamicHoverStyle
BackColor="#E6E6E6" />
<StaticHoverStyle
Font-Bold="True" CssClass="MainMenuStatic2" />
<StaticMenuStyle
BackColor="Transparent" CssClass="MainMenuStatic1" />
</asp:Menu>

My problem is that there is a gap of about 3px between each dynamic menu
items. The worst is that when mouse pointer point to these gap, the menu
disappear. You can see I only placed a LinkButton in the
DynamicItemTemplate, why there are gaps?
Thanks a lot.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top