J
Jeff
hi
asp.net 2.0
I wan thte menu to be horizontally centered on the webpage, but I want the
submenuitems to left aligned.
So I created a table cell with HorizontalAlign set to Center. With this
option set the menu was horizontaly centered as I wanted, except that also
submenuitems was centered too (not what I wanted). So then I tryed to add a
extra div around the menu (<div style="text-align:left; margin-left:auto;
margin-right:auto;">). But that didn't help either...
any suggestions?
Here is my markup:
<asp:TableCell BackColor="BlueViolet" ColumnSpan="2"
HorizontalAlign="Center">
<asp:LoginView ID="LoginView2" runat="server">
<AnonymousTemplate></AnonymousTemplate>
<RoleGroups>
<asp:RoleGroup Roles="Administrator">
<ContentTemplate>
<div style="text-align:left;
margin-left:auto; margin-right:auto;">
<asp:Menu ID="Menu1" runat="server"
SkinID="menu"
CssClass="menu"
DataSourceID="smdsAdministrator"
StaticDisplayLevels="2"
Orientation="Horizontal">
</asp:Menu></div>
skin:<asp:menu runat="server"
SkinId="menu"
BackColor="#f0f0f0"
ForeColor="#6B0808"
StaticMenuItemStyle-HorizontalPadding="5px"
DynamicHoverStyle-BackColor="#6B0808"
DynamicHoverStyle-ForeColor="#FFFFFF"
StaticSubMenuIndent="10px"
DynamicMenuItemStyle-HorizontalPadding="5px"></asp:menu>
asp.net 2.0
I wan thte menu to be horizontally centered on the webpage, but I want the
submenuitems to left aligned.
So I created a table cell with HorizontalAlign set to Center. With this
option set the menu was horizontaly centered as I wanted, except that also
submenuitems was centered too (not what I wanted). So then I tryed to add a
extra div around the menu (<div style="text-align:left; margin-left:auto;
margin-right:auto;">). But that didn't help either...
any suggestions?
Here is my markup:
<asp:TableCell BackColor="BlueViolet" ColumnSpan="2"
HorizontalAlign="Center">
<asp:LoginView ID="LoginView2" runat="server">
<AnonymousTemplate></AnonymousTemplate>
<RoleGroups>
<asp:RoleGroup Roles="Administrator">
<ContentTemplate>
<div style="text-align:left;
margin-left:auto; margin-right:auto;">
<asp:Menu ID="Menu1" runat="server"
SkinID="menu"
CssClass="menu"
DataSourceID="smdsAdministrator"
StaticDisplayLevels="2"
Orientation="Horizontal">
</asp:Menu></div>
skin:<asp:menu runat="server"
SkinId="menu"
BackColor="#f0f0f0"
ForeColor="#6B0808"
StaticMenuItemStyle-HorizontalPadding="5px"
DynamicHoverStyle-BackColor="#6B0808"
DynamicHoverStyle-ForeColor="#FFFFFF"
StaticSubMenuIndent="10px"
DynamicMenuItemStyle-HorizontalPadding="5px"></asp:menu>