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 1011049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T09:10:35+00:00 2026-05-16T09:10:35+00:00

The title poses the question. Here’s a scenario: You’re making a website with ASP.NET

  • 0

The title poses the question. Here’s a scenario:

You’re making a website with ASP.NET 4.0/C#, although xml alone is suitable for this example. The site will have a site map and a default page with a menu control, as follows:

Web.sitemap

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
  <siteMapNode url="~/default.aspx" title="Home"  description="">
    <siteMapNode url="~/1.aspx" title="Link 1" description="" />
    <siteMapNode url="~/2.aspx" title="Link 2"  description="" />
    <siteMapNode url="~/3.aspx" title="Link 3"  description="" />
    <siteMapNode url="~/4.aspx" title="Link 4" description="" />
    <siteMapNode url="~/5.aspx" title="Link 5" description="" />
  </siteMapNode>
</siteMap>

Web.config

<?xml version="1.0"?>
  <configuration>
    <system.web>
      <compilation debug="true" targetFramework="4.0"/>
      <pages theme="Default" clientIDMode="AutoID">
      </pages>
    </system.web>
  </configuration>

Default.aspx
Note: Only the contents of the <form> element are shown.

<asp:Menu 
  ID="navMenu" 
  DataSourceID="srcSiteMap"
  StaticEnableDefaultPopOutImage="false"
  RenderingMode="list"
  CssClass="navMenu"
  runat="server"> 
</asp:Menu>
<asp:SiteMapDataSource ID="srcSiteMap" runat="server" 

ShowStartingNode=”false” />

StyleSheet.css
_Note: This file is included in ~/App_Themes/Default/ and referenced in

Web.config._

body {
width:800px;
margin:0px auto;
}
.navMenu {
background-color:Yellow;
}

With these files in use, the asp.net 4.0 engine will proceed to render a column of broken links. What I am unable to explain is why this column is only the width of the widest link, instead of the width of the 800px body element. Even if width:auto; is specified for the .navMenu css class, this remains the case. However, if you specify width:100%; or width:800px;, this fixes the problem, whatever the problem may be.

Now, I am hardly a master of css or the asp.net rendering engine, but looking at the page’s source, I simply can’t find any explanation. Perhaps I’m overlooking the obvious, but in the name of science, I hope to discover the truth! Should someone find the time to create a new visual studio solution, or simply know off the top of his/her head, I’d appreciate it.

  • 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-16T09:10:36+00:00Added an answer on May 16, 2026 at 9:10 am

    Is this an issue within your .net creation program (e.g. Visual studio) or a browser? If it is not an issue in browser then it must be the program’s own stylesheet

    without seeing the html output this is a little tricky but I suspect you will have something like:

    <html>
      <body>
        <form>
          <ul class="navMenu">
          </ul>
        </form>
      </body>
    </html>
    

    using firebug or something similar I would check to see what the highest item in the tier is with the small width. I suspect that the form element is somehow shrink wrapping (is it display:inline? floated?)

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

Sidebar

Related Questions

I'm trying to implement routing such as the following: posts/535434/This-is-a-post-title posts/tagged/tags+here // Matches {controller}/{action}/{id}
Title is the entire question. Can someone give me a reason why this happens?
This is in conjunction to the question posed here: JTabbedPane: Components before and after
Rails Newb here asking his first question.... I'm building a personal blog-style website that
Title might be a bit confusing, so let me explain. I have a website
The previous question is here : what is the common practice on limit the
Hey everyone, here is the site in question: http://www.myvintagesecret.com/ I have a bunch of
I feel like this question has probably been asked a thousand times already, so
This is a double question: The correct answer will go to How you do
Here is the question posed by a professor: Find the minimum and maximum length

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.