Click here to Skip to main content
15,923,845 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all

I have a menu control in my mater page. When i maximize the browser from small window to full screen the menu is moving to left of screen . It is getting aligned properly On mouse over event. the same way when i shrink the browser from full size the menu is moving to right side. ON mouse Over event it is again aligning properly... This happens in both IE 6 and 7. I didn't check it in later versions. but most of the systems here have IE 7
The frame that i use is .Net4.0.

Please help me on the same


XML
<table width="100%" cellpadding="0" cellspacing="0" style="background-color: Black; height: 30px; ">
        <tr style="background-color: Black; height: 30px;">
            <td  style="background-color: Black; width: 100%; height: 30px;">
            <div style="height:30px">
                <asp:Menu ID="NavigationMenu" runat="server" EnableViewState="false" RenderingMode="Default" CssClass="menu" ForeColor="White"
                    IncludeStyleBlock="false" Orientation="Horizontal" Height="30px" OnMenuItemClick="NavigationMenu_MenuItemClick" >
                    <StaticMenuItemStyle CssClass="menuitem" />
                    <DynamicMenuItemStyle CssClass="menuitem" />
                    <Items>
                        <asp:MenuItem NavigateUrl="~/Home.aspx" Text="Home" ToolTip="Home page" />
                        <asp:MenuItem NavigateUrl="~/CommonUser.aspx" Text="Create / Edit User Access" ToolTip="Provide access to users" />
                        <asp:MenuItem NavigateUrl="~/BulkUpload.aspx" Text="Bulk Upload" ToolTip="To bulk upload users " />
                        <asp:MenuItem NavigateUrl="~/SearchUser.aspx" Text="View / Revoke User Access" ToolTip="View existing users access" />

                        <asp:MenuItem Text="Admin" NavigateUrl="javascript:void(0);">
                            <asp:MenuItem NavigateUrl="javascript:void(0);" Text="User" ToolTip="Create / Edit User for the application">
                                <asp:MenuItem Text="Create User" NavigateUrl="~/AdminUser.aspx" />
                                <asp:MenuItem Text="Edit User" NavigateUrl="~/EditAdminUser.aspx" />
                            </asp:MenuItem>
                            <asp:MenuItem Text="Template" NavigateUrl="javascript:void(0);">
                                <asp:MenuItem Text="Create Template" />
                                <asp:MenuItem Text="Edit Template" />
                            </asp:MenuItem>
                            <asp:MenuItem NavigateUrl="javascript:void(0);" Text="Server" ToolTip="Add / Edit server Details">
                                <asp:MenuItem Text="Add Server" NavigateUrl="~/AddServers.aspx" />
                                <asp:MenuItem Text="Edit Server" NavigateUrl="~/EditServer.aspx" />
                            </asp:MenuItem>
                            <asp:MenuItem NavigateUrl="~/CreateConString.aspx" Text="Environment Password" ToolTip="Change password for connection string" />
                        </asp:MenuItem>

                    </Items>
                </asp:Menu>
                </div>
            </td>
        </tr>
    </table>
Posted

1 solution

Use below code,I think this may be the suggession.

C#
<div class="menu">
        <ul>
          <li><a href="#">item 1</a></li>
          <li><a href="#">item 2</a></li>
          <li><a href="#">item 3</a></li>
          <li><a href="#">item 4</a></li>
          <li><a href="#">item 5</a></li>
          <li><a href="#">item 6</a></li>
        </ul>
</div>


CSS For menu class:

CSS
.menu
{
    width: 948px;
    height: 50px;
    margin: 0 auto;
    background: #6b3602;
    border-left: 1px solid #fff;
    border-right: 1px solid #fff;
    border-top: 1px solid #fff;
    clear: left;
    position: static;
}
.menu ul {
    display: inline-block;
    margin-top: 14px;
    margin-left: 25px;
    padding: 0;
}
.menu ul li {
    display: inline-block;
    margin: auto 15px !important;
}
.menu ul li:hover {
    visibility: inherit;

}
.menu ul li a {
    color: #a95401;
    font-size: 16px;
    font-weight:600;
    letter-spacing: 0.5px;
    line-height: 22px;
    text-decoration: none;
    font-family: 'Petit Formal Script', cursive;
}
.menu ul li a:hover {
    color: #5a2a00;
    text-decoration: none;
}
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900