它不在主要部分的左侧,而是在其上方。我不确定为什么。
#sidebar {
float:left;
}
<body>
<div class="page">
<header>
<div id="title">
<h1>My MVC Application</h1>
</div>
<div id="logindisplay">
Welcome <strong>@User.Identity.Name</strong>!
</div>
<nav>
<ul id="menu">
<li>@Html.ActionLink("Home", "Index", "Home")</li>
<li>@Html.ActionLink("About", "About", "Home")</li>
</ul>
</nav>
</header>
<nav id="sidebar">
Go To...
<ul>
<li>First Move to Moon</li>
<li>First Move to Moon</li>
<li>First Move to Moon</li>
<li>First Move to Moon</li>
<li>First Move to Moon</li>
<li>First Move to Moon</li>
<li>First Move to Moon</li>
<li>First Move to Moon</li>
<li>First Move to Moon</li>
<li>First Move to Moon</li>
<li>First Move to Moon</li>
<li>First Move to Moon</li>
<li>First Move to Moon</li>
<li>First Move to Moon</li>
</ul>
</nav>
<section id="main">
@RenderBody()
</section>
<footer>
</footer>
</div>
</body>