asp.net - Menu control builds and renders differently between environments -
i put following menu control on page:
<div class="phase2menucontainer"> <asp:menu runat="server" id="mnuhome" orientation="vertical" staticmenustyle-cssclass="phase2menu"> <items> <asp:menuitem selectable="true" text="download sketch sheet" navigateurl="~/documents/sketch sheet.pdf" target="_blank"></asp:menuitem> <asp:menuitem selectable="true" text="create data sheet" navigateurl="createdatasheet.aspx"></asp:menuitem> <asp:menuitem selectable="true" text="personalize data" navigateurl="personalize.aspx" enabled="false"></asp:menuitem> </items> </asp:menu> </div>
when run on localhost, builds tables fine because knew when wrote css.
the problem here when copied live environment, builds spans , divs, css broke.
here's css (the live copy removes margin: 5px 0;
lines)
.phase2menucontainer { width: 250px; margin: 15px auto; } .phase2menu a, .phase2menu span { display: block; padding: 10px; margin: 5px 0; color: #fff; height: 30px; line-height: 30px; width: 200px; background: #018cd2; border: 1px solid #0159a0; } .phase2menu a[disabled=true], .phase2menu span[disabled=disabled] { display: block; padding: 10px; margin: 5px 0; color: #fff; height: 30px; line-height: 30px; width: 200px; background: #c1c1c1; border: 1px solid #0159a0; } .phase2menu a:not([disabled=true]):hover { background: #3b3486; }
it took me half hour fix , got working (although live stylesheet different test one).
can explain me why menu built differently between localhost , live server? i'm sure shouldn't happen if it's been done correctly...
set renderingmode
of menu
table
..like this. render menu
table...
<asp:menu runat="server" id="mnuhome" orientation="vertical" renderingmode="table" staticmenustyle-cssclass="phase2menu">
Comments
Post a Comment