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

I want to move my menu controller to the center,any one who can help me
here is my code:

html:
XML
<div class="header">
            <div class="clear hideSkiplink">
                <asp:Menu ID="NavigationMenu" runat="server" CssClass="menu"
                            StaticMenuStyle-CssClass="menu"
                            StaticMenuItemStyle-CssClass="menu"
                            EnableViewState="false" IncludeStyleBlock="false"
                    Orientation="Horizontal" RenderingMode="List" ItemWrap="false" Font-Size="Small">
                    <Items>
                        <asp:MenuItem NavigateUrl="~/Home/Default.aspx" Text="Home" />
                        <asp:MenuItem NavigateUrl="industrysolutions/OurApproach .aspx" Text="our approach  " />
                        <asp:MenuItem NavigateUrl="~/solutionlayers/solutionlayers.aspx" Text="solutions"/>
                        <asp:MenuItem NavigateUrl="~/industrysolutions/industrysolutions.aspx" Text="industries"/>
                        <asp:MenuItem NavigateUrl="~/partners/technologypartners.aspx" Text="partners"/>
                        <asp:MenuItem NavigateUrl="~/newsroom/pressreleases.aspx" Text="newsroom"/>
                        <asp:MenuItem NavigateUrl="~/About/TheTeam.aspx" Text="About Dac" />
                        <asp:MenuItem NavigateUrl="~/contactus/contactdetails.aspx" Text="contact us" />
                    </Items>
                </asp:Menu>
            </div>
            <table class="HeaderTable"  cellspacing="0" cellpadding="0">
                <tr>
                    <td class="HeaderLogoCell" >
                        <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/dac_logo.png" />
                    </td>
                    <td class="HeaderMenuCell">
                         <asp:Menu ID="SubMenu"  runat="server" CssClass="menuSub"
                             EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal"
                             BorderStyle="None" RenderingMode="List">
                             <DynamicMenuStyle CssClass="IE8Fix" />
                            <Items>
                                <%--<asp:MenuItem NavigateUrl="~/partners/technologypartners.aspx" Text="technology partners"/>
                                <asp:MenuItem NavigateUrl="~/partners/channelpartners.aspx" Text="channel partners"/>--%>
                            </Items>
                        </asp:Menu>
                    </td>
                </tr>
            </table>
        </div>


CSS:

CSS
/* TAB MENU
----------------------------------------------------------*/

div.hideSkiplink
{
    width: 960px;
    margin-left: 15px;
    margin-top: 5px;
    text-align:center;
}

.HeaderTable
{
    width: 980px;
    padding: 0px;
    margin: 8px 0px 0px 8px;
    vertical-align: top;
    border-spacing: 0px;
}

.HeaderLogoCell
{
    text-align:left;width:305px; padding-top:21px; padding-left:120px;
}

.HeaderMenuCell
{
    vertical-align:top;
}



div.menu
{
    margin-top: 5px;
    padding: 0px 0px 0px 0px;
    table-layout:fixed;
     width: 960px;
}

div.menu ul
{
    list-style: none;
    margin: 0px;
    padding: 0px;
    width: auto;
}

div.menu li
{
    display: inline-block;
    text-align: center;
}

div.menu ul li a, div.menu ul li a:visited
{
    /*letter-spacing: 1px;*/
    color: #FFFFFF;
    display: block;
    line-height: 26px;
    padding: 0px;
    text-decoration: none;
    text-transform: lowercase;
    width: 135px;
    white-space: nowrap;
    border-right-style: solid;
    border-right-width: 1px;
    border-right-color: #FFFFFF;
    text-align: center;

}
div.menu li:last-child a {
    border:none;
}

div.selected
{
    font-weight: bold;
}


Please note this was not created by me!am just only updating the website
NB:am still a leaner!
Posted
Updated 4-Jul-13 23:18pm
v2

C#
<asp:menu id="NavigationMenu" runat="server" style="top: 23px; left: 7px; position: absolute; height: 26px; width: 938px" xmlns:asp="#unknown">
        CssClass="menu"
                            StaticMenuStyle-CssClass="menu"
                            StaticMenuItemStyle-CssClass="menu"
                            EnableViewState="false" IncludeStyleBlock="false"
                    Orientation="Horizontal" RenderingMode="List" ItemWrap="false" 
            Font-Size="Small">
                    <items>
                        <asp:menuitem navigateurl="~/Home/Default.aspx" text="Home" />
                        <asp:menuitem navigateurl="industrysolutions/OurApproach .aspx" text="our approach  " />
                        <asp:menuitem navigateurl="~/solutionlayers/solutionlayers.aspx" text="solutions" />
                        <asp:menuitem navigateurl="~/industrysolutions/industrysolutions.aspx" text="industries" />
                        <asp:menuitem navigateurl="~/partners/technologypartners.aspx" text="partners" />
                        <asp:menuitem navigateurl="~/newsroom/pressreleases.aspx" text="newsroom" />
                        <asp:menuitem navigateurl="~/About/TheTeam.aspx" text="About Dac" />
                        <asp:menuitem navigateurl="~/contactus/contactdetails.aspx" text="contact us" />
                    </items>
                </asp:menu>



Use This code I have included the style
 
Share this answer
 
Comments
Puseletso Michelle 5-Jul-13 5:46am    
hi there its not helping the menu moved on top of the logo!
Make Comment this id ( .HeaderLogoCell) in Your Css file and move your menu to up or adjus your padding-top size
 
Share this answer
 

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