Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7569303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:07:56+00:00 2026-05-30T15:07:56+00:00

I am building an asp.net mvc application. I have my top menu structure which

  • 0

I am building an asp.net mvc application. I have my top menu structure which is in my master page. It seems to render differently on either different screen sizes or different screen resolutions. This leaves the menu structure looking terrible. I want it to be the same at all times. Below is my master page html:

<body>
<div class="page">

    <div id="header">
        <div id="badge" style="float:left; width:20%;"><img src="../../Content/Images/School_Badge.jpg" alt="badge"/></div>

        <div id="title" style="width:80%;">
            <h1>School</h1>
            <h2>
            School Motto: Famba <br />
            English Meaning: Move Forward
            </h2>
        </div>

        <br/><br/><br/><br/>
        <div id="menucontainer">

            <ul id="menu">              
                <li><%: Html.ActionLink("About us", "Index", "Home")%></li>
                <li><%: Html.ActionLink("Admissions", "Admissions", "Home")%></li>
                <li><%: Html.ActionLink("Boarding", "Boarding", "Home")%></li>
                <li><%: Html.ActionLink("Academic", "Academic", "Home")%></li>
                <li><%: Html.ActionLink("Cultural", "Cultural", "Home")%></li>
                <li><%: Html.ActionLink("Sport", "Sport", "Home")%></li>
                <li><%: Html.ActionLink("Staff members", "Staff", "Home")%></li>
                <li><%: Html.ActionLink("Contact us", "ContactUs", "Home")%></li>
            </ul>

        </div>
    </div>

    <div id="main">
        <asp:ContentPlaceHolder ID="MainContent" runat="server" />

        <div id="footer">
        P.O Box 507 School| Phone: +23232 39 265064 | Fax: +232332 39 266043 |
        © Copyright Private School <%: DateTime.Now.Year %> <br /> <br />
        </div>
    </div>
</div>

and the css related to this is as follows:

.page
{
    width: 72%;
    margin-left: auto;
    margin-right: auto;
}

#header
{
    position: relative;
    margin-bottom: 0px;
    color: #000;
    padding-top: 20px;
}

#header h1
{
    font-weight: bold;
    padding: 5px 0;
    margin: 0;
    color: #fff;
    border: none;
    line-height: 2em;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 32px !important;
}

#header h2
{
    font-weight: bold;
    padding: 5px 0;
    margin: 0;
    color: #fff;
    border: none;
    line-height: 2em;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px !important;
}

#main
{
    position:relative;
    padding: 30px 0px 15px 0px;
    background-color: #fff;
    margin-bottom: 30px;
    _height: 1px; /* only IE6 applies CSS properties starting with an underscore */
}

#menucontainer
{
    margin-top:100px;
}

div#title
{
    display:block;
    float:left;
    text-align:left;
}

ul#menu
{
    border-bottom: 1px #5C87B2 solid;
    padding: 0 0 2px;
    position: relative;
    margin: 0;
    text-align:center;
}

ul#menu li
{
    display: inline;
    list-style: none;
}

ul#menu li#greeting
{
    padding: 10px 20px;
    font-weight: bold;
    text-decoration: none;
    line-height: 2.8em;
    color: #fff;
}

ul#menu li a
{
    padding: 10px 20px;
    font-weight: bold;
    text-decoration: none;
    line-height: 2.8em;
    background-color: #e8eef4;
    color: #151B54;
}

ul#menu li a:hover
{
    background-color: #fff;
    text-decoration: none;
}

ul#menu li a:active
{
    background-color: #a6e2a6;
    text-decoration: none;
}                                                                                     

ul#menu li.selected a
{
     background-color: #fff;
     color: #000;
}

The first image shows the Correct display all the time, and the second one shows Incorrect display, what I am trying to avoid.

Correct display all the time

Incorrect display, what I am trying to avoid

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T15:07:57+00:00Added an answer on May 30, 2026 at 3:07 pm

    give menucontainer a specific width

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.NET MVC application I'm building and I'm using a Master page.
I am building an application in ASP.NET MVC 3 in which I have implemented
I'm building an Asp.net MVC 2 application. I have an entity called Team that
We have started building an asp.net mvc application. Application will consist with one main
We are building an ASP.NET MVC application which will be deployed behind a hardware
I have ASP.NET MVC web application. I need to deploy it which consists of:
I'm building an ASP.NET MVC application with a form that needs validation. The majority
I'm building my first ASP.NET MVC application and I am having some troubles with
I'm am building my asp.net web application using MVC (Preview 5), and am also
I am currently building an application using ASP.NET MVC. The data entry pages are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.