我一直在使用新的剃刀视图引擎摆弄asp.net mvc 3.
我的目标是在每列中使用固定流体2列布局和jqGrid.我虽然没有运气!只要我向右栏添加一个网格,它的标题就会变得很大.我不认为它的jqGrids错误,因为如果我删除样式,两个网格都按预期显示.
我看到jqGrid的css将display:block作为ui-helper-clearfix类的一部分应用于头部.
任何人都有任何建议让这个工作或其他固定流体css我可以尝试(我尝试了一堆模板从网上没有运气)?
- ... <style type="text/css">
- #left { float: left; width: 400px;}
- #content { margin-left: 400px;}
- </style>
- </head>
- <body>
- <div>
- <div id="left">
- @RenderSection("SPTreeGrid")
- </div>
- <div id="content">
- @RenderSection("ClientPickerGrid")
- </div>
- </div>
- </body>
更新:
我的页面实际上需要在左侧显示固定宽度的2个网格,在右侧显示流畅的网格.
这是我的CSS的一个问题(我仍然不知道为什么)但我最终使用以下布局工作(轨道是左栏):
- #container{
- overflow:hidden;
- padding-left:400px; /* The width of the rail */
- }
- * html #container{
- height:1%; /* So IE plays nice */
- }
- #content
- {
- width:100%;
- border-left:400px; /* The width and color of the rail */
- margin-left:-400px;
- float:right;
- }
- #rail{
- width:400px;
- float:left;
- margin-left:-400px;
- display:inline; /* So IE plays nice */
- }
CSHTML:
- <div id="container">
- <div id="content">
- @RenderSection("ReportGrid")
- </div>
- <div id="rail">
- @RenderSection("SPTreeGrid")
- @RenderSection("ClientPickerGrid")
- </div>
- </div>