Html 为什么我的身体被推到我的侧栏下?
我有一个问题,我的renderbody内容消失在我左侧浮动的侧栏下面。我试图通过打开VisualStudio提供的默认internet web模板来找出css中到底出了什么问题,我可以看到他们使用媒体查询来更改较小屏幕上的样式。我也在尝试做同样的事情,但没有看到任何变化:( 要查看实际问题,您一定可以访问我的开发站点。如果您将窗口宽度减小,您将看到问题 这是我的布局视图的标记Html 为什么我的身体被推到我的侧栏下?,html,css,Html,Css,我有一个问题,我的renderbody内容消失在我左侧浮动的侧栏下面。我试图通过打开VisualStudio提供的默认internet web模板来找出css中到底出了什么问题,我可以看到他们使用媒体查询来更改较小屏幕上的样式。我也在尝试做同样的事情,但没有看到任何变化:( 要查看实际问题,您一定可以访问我的开发站点。如果您将窗口宽度减小,您将看到问题 这是我的布局视图的标记 @model gcaMusicExchange.ViewModels.ViewModelBase <!DOCTYP
@model gcaMusicExchange.ViewModels.ViewModelBase
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>@ViewBag.Title</title>
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<meta name="viewport" content="width=device-width" />
@Styles.Render("~/Content/css")
<link href="~/Content/themes/base/jquery-ui.css" rel="stylesheet" />
<link href="~/Content/themes/base/chosen.css" rel="stylesheet" />
@Scripts.Render("~/bundles/jquery")
@*<script src="~/Scripts/jquery.min.js"></script>*@
<script src="~/Scripts/jquery-1.7.1.min.js"></script>
<script src="~/Scripts/jquery-ui-1.8.20.js"></script>
<script src="~/Scripts/jquery.unobtrusive-ajax.js"></script>
<script src="~/Scripts/chosen.jquery.js"></script>
<script src="~/Scripts/jquery.slider.min.js"></script>
@Scripts.Render("~/bundles/modernizr")
<!--[if !IE 7]>
<style type="text/css">
#wrap {display:table;height:100%}
</style>
<![endif]-->
</head>
<body>
<header>
<div class="content-wrapper">
<div class="float-left">
<p class="site-title">
<img height="70px" style="margin-left:-300px; margin-top:-10px" src="~/Images/jdmxchange.jpg" /></p>
</div>
<div class="float-right">
<section id="login">
@Html.Partial("_LoginPartial")
</section>
<nav>
<ul id="menu">
<li>@Html.ActionLink("Home", "Index", "Home")</li>
<li>@Html.ActionLink("About", "About", "Home")</li>
<li>@Html.ActionLink("Contact", "Contact", "Home")</li>
</ul>
</nav>
</div>
</div>
</header>
<div class="sidebar ">
<div id="commandControls" class="navbar-leftside-content">
<div id="firstBlock" style="background-color:#FFFFFF; padding:10px; border-radius:3px;margin-top:15px">
<h1 style="color:#1C75B8">Performance Parts</h1>
@Html.ActionLink("Browse all parts", "Index", "ResultsList")
<br />
<br />
@Html.ActionLink("Browse by vehicle application", "PerformancePartsByVehicle", "Browse")
<br />
<br />
@Html.ActionLink("Browse by part category", "PerformancePartsByCategory", "Browse", null, null)
<br />
<br />
@Html.ActionLink("Browse by part manufacturer", "PerformancePartsByManufacturerLetter", "Browse", null, null)
</div>
<div id="secondBlock" style="background-color:#FFFFFF; padding:10px; border-radius:3px;margin-top:15px">
<h1 >Vehicle Listings</h1>
@Html.ActionLink("Browse all vehicles", "Index", "VehicleListings", null, null)
<br />
<br />
@Html.ActionLink("Browse custom builds", "Index", "VehicleListings", null, null)
<br />
<br />
@Html.ActionLink("Browse shells", "Index", "VehicleListings", null, null)
</div>
<div id="thirdsBlock" style="background-color:#FFFFFF; padding:10px; border-radius:3px;margin-top:15px">
<h1>Account</h1>
@* @Html.ActionLink("Mechanical", "ShellBuilds", "Browse", null, null)
<br />
<br />
@Html.ActionLink("Cosmetic", "ShellBuilds", "Browse", null, null)
<br />
<br />
@Html.ActionLink("Electrical", "ShellBuilds", "Browse", null, null)
<br />
<br />
@Html.ActionLink("Computer", "ShellBuilds", "Browse", null, null)
<br />
<br />
@Html.ActionLink("Driving", "ShellBuilds", "Browse", null, null)
<br />
<br />
@Html.ActionLink("Misc", "ShellBuilds", "Browse", null, null)
<br />
<br />*@
@Html.ActionLink("Post a part for sale", "Index", "VehicleSelect", null, null)
<br />
<br />
Post a vehicle for sale
@*@Html.ActionLink("Post a vehicle for sale", "Create", "ItemPost", null, null)*@
<br />
<br />
@*If the user is currently logged on*@
@if (User.Identity.IsAuthenticated)
{
@Html.ActionLink("View your posts", "DisplayMyPosts", "Account", null, null)
<br />
<br />
@Html.ActionLink("View your purchases", "MyPurchases", "Account", null, null)
<br />
<br />
@Html.ActionLink("Messages", "Index", "Message", null,null)
<br />
<br />
<span>Favorites</span>
@*@Html.ActionLink("Notables", "NotablesMain")*@
<br />
<br />
<span>Notifier</span>@*
@Html.ActionLink("Agent", "AgentConfig")
*@<br />
<br />
<span>Account Settings</span>
@*@Html.ActionLink("Account Settings", "Settings")*@
}
else
{
<br />
<br />
}
</div>
<div id="fourthBlock" style="background-color:#FFFFFF; padding:10px; border-radius:3px;margin-top:15px">
<h1>Events and Meets</h1>
</div>
</div>
</div>
<div>
@RenderSection("featured", required: false)
</div>
<div id="body">
<section class="content-wrapper clear-fix">
@RenderBody()
</section>
</div>
@RenderSection("scripts", required: false)
@model gcaMusicExchange.ViewModels.ViewModelBase
@视图包。标题
@style.Render(“~/Content/css”)
@Scripts.Render(“~/bundles/jquery”)
@**@
@Scripts.Render(“~/bundles/modernizer”)
@Html.Partial(“_LoginPartial”)
- @ActionLink(“主页”、“索引”、“主页”)
- @ActionLink(“关于”、“关于”、“主页”)
- @ActionLink(“联系人”、“联系人”、“主页”)
性能部件
@ActionLink(“浏览所有部分”、“索引”、“结果列表”)
@Html.ActionLink(“按车辆应用程序浏览”、“PerformancePartsByVehicle”、“浏览”)
@ActionLink(“按部件类别浏览”、“PerformancePartsByCategory”、“浏览”、null、null)
@ActionLink(“按零件制造商浏览”、“PerformancePartsByManufacturerLetter”、“浏览”,空,空)
车辆列表
@ActionLink(“浏览所有车辆”、“索引”、“车辆列表”、null、null)
@ActionLink(“浏览自定义版本”、“索引”、“车辆列表”、null、null)
@ActionLink(“浏览shell”、“索引”、“车辆列表”、null、null)
账户
@*@Html.ActionLink(“机械”、“外壳构建”、“浏览”、空、空)
@ActionLink(“化妆品”、“外壳构建”、“浏览”、null、null)
@ActionLink(“电气”、“外壳构建”、“浏览”、null、null)
@ActionLink(“计算机”,“外壳构建”,“浏览”,空,空)
@ActionLink(“驱动”、“外壳构建”、“浏览”、null、null)
@ActionLink(“杂项”、“外壳构建”、“浏览”、null、null)
*@
@ActionLink(“发布销售零件”、“索引”、“车辆选择”、空、空)
邮寄车辆出售
@*@ActionLink(“发布车辆出售”、“创建”、“项目发布”、null、null)*@
@*如果用户当前已登录*@
@if(User.Identity.IsAuthenticated)
{
@ActionLink(“查看你的帖子”、“显示我的帖子”、“账号”、null、null)
@ActionLink(“查看您的购买”、“我的购买”、“帐户”、null、null)
@ActionLink(“消息”、“索引”、“消息”、null、null)
最爱
@*@ActionLink(“Notables”,“NotablesMain”)*@
通知者@*
@ActionLink(“代理”、“代理配置”)
*@
帐户设置
@*@ActionLink(“帐户设置”、“设置”)*@
}
其他的
{
}
活动和会议
@渲染部分(“特色”,必填项:false)
@RenderBody()
@RenderSection(“脚本”,必需:false)
我认为您可以在浏览器的源代码中看到css,而不是发布我的css(它是巨大的)。在讨论客户端问题时,请同时显示客户端代码,而不是服务器端代码(我们不知道它将如何呈现).这里的问题是,你实际上没有浮动侧边栏,但绝对定位了它。@CBroe谢谢。这让我走上了正确的方向。我现在可以看到我的侧边栏正在调整;但是,它给我的其余布局带来了更多的问题。让我看看我是否能找到可行的方法。至于客户端c你要求的ode,你的意思是css和html,对吗?因为我的css很大,我不想因为发布这么大的代码块而被否决。发布代码时,你应该把它大体上减少到相关部分。在这种情况下,我特别指的是你代码中大量的
@关键字
,它们不是html,因此没有帮助在查看客户端问题时,您会感到非常不安。