Asp.net mvc 开发asp.net mvc应用程序时,索引表与页面边框重叠
在.NET中进行了多年的C#Windows窗体开发之后,我正在开发我的第一个web应用程序。我一直在遵循NerdDinner教程,并在需要的地方进行更改,以满足我的程序需要。我还有一些东西要添加,但目前所有的功能都正常工作 我将索引视图保留为一个表。显示时,表格比浏览器窗口宽(即使最大化),我可以使用底部的滚动条查看整个表格。但是,在浏览器窗口周围有一个边框,表格重叠,因此表格的后半部分位于蓝色边框上,而不是白色边框上。我还没有对site.css做任何更改。我试着在网上搜索解决方案,但搜索范围太广,因为我不知道需要更改哪个元素。我遇到的大多数事情都是更新表上的边框,而不是页面Asp.net mvc 开发asp.net mvc应用程序时,索引表与页面边框重叠,asp.net-mvc,css,border,Asp.net Mvc,Css,Border,在.NET中进行了多年的C#Windows窗体开发之后,我正在开发我的第一个web应用程序。我一直在遵循NerdDinner教程,并在需要的地方进行更改,以满足我的程序需要。我还有一些东西要添加,但目前所有的功能都正常工作 我将索引视图保留为一个表。显示时,表格比浏览器窗口宽(即使最大化),我可以使用底部的滚动条查看整个表格。但是,在浏览器窗口周围有一个边框,表格重叠,因此表格的后半部分位于蓝色边框上,而不是白色边框上。我还没有对site.css做任何更改。我试着在网上搜索解决方案,但搜索范围太
/*----------------------------------------------------------
The base color for this template is #5c87b2. If you'd like
to use a different color start by replacing all instances of
#5c87b2 with your new color.
----------------------------------------------------------*/
body
{
background-color: #5c87b2;
font-size: .75em;
font-family: Verdana, Helvetica, Sans-Serif;
margin: 0;
padding: 0;
color: #696969;
/* width: auto; */
}
a:link
{
color: #034af3;
text-decoration: underline;
}
a:visited
{
color: #505abc;
}
a:hover
{
color: #1d60ff;
text-decoration: none;
}
a:active
{
color: #12eb87;
}
p, ul
{
margin-bottom: 20px;
line-height: 1.6em;
}
/* HEADINGS
----------------------------------------------------------*/
h1, h2, h3, h4, h5, h6
{
font-size: 1.5em;
color: #000;
font-family: Arial, Helvetica, sans-serif;
}
h1
{
font-size: 2em;
padding-bottom: 0;
margin-bottom: 0;
}
h2
{
padding: 0 0 10px 0;
}
h3
{
font-size: 1.2em;
}
h4
{
font-size: 1.1em;
}
h5, h6
{
font-size: 1em;
}
/* this rule styles <h2> tags that are the
first child of the left and right table columns */
.rightColumn > h1, .rightColumn > h2, .leftColumn > h1, .leftColumn > h2
{
margin-top: 0;
}
/* PRIMARY LAYOUT ELEMENTS
----------------------------------------------------------*/
/* you can specify a greater or lesser percentage for the
page width. Or, you can specify an exact pixel width. */
.page
{
/* width: auto; */
/* width: 90%; */
margin-left: auto;
margin-right: auto;
}
#header
{
position: relative;
margin-bottom: 0px;
color: #000;
padding: 0;
}
#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;
}
#main
{
padding: 30px 30px 15px 30px;
background-color: #fff;
margin-bottom: 30px;
_height: 1px; /* only IE6 applies CSS properties starting with an underscrore */
}
#footer
{
color: #999;
padding: 10px 0;
text-align: center;
line-height: normal;
margin: 0;
font-size: .9em;
}
/* TAB MENU
----------------------------------------------------------*/
ul#menu
{
border-bottom: 1px #5C87B2 solid;
padding: 0 0 2px;
position: relative;
margin: 0;
text-align: right;
}
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: #034af3;
}
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;
}
/* FORM LAYOUT ELEMENTS
----------------------------------------------------------*/
fieldset
{
margin: 1em 0;
padding: 1em;
border: 1px solid #CCC;
}
fieldset p
{
margin: 2px 12px 10px 10px;
}
fieldset label
{
display: block;
}
fieldset label.inline
{
display: inline;
}
legend
{
font-size: 1.1em;
font-weight: 600;
padding: 2px 4px 8px 4px;
}
input[type="text"]
{
width: 200px;
border: 1px solid #CCC;
}
input[type="password"]
{
width: 200px;
border: 1px solid #CCC;
}
/* TABLE
----------------------------------------------------------*/
table
{
border: solid 1px #e8eef4;
border-collapse: collapse;
}
table td
{
padding: 5px;
border: solid 1px #e8eef4;
}
table th
{
padding: 6px 5px;
text-align: left;
background-color: #e8eef4;
border: solid 1px #e8eef4;
}
/* MISC
----------------------------------------------------------*/
.clear
{
clear: both;
}
.error
{
color: Red;
}
#menucontainer
{
margin-top:40px;
}
div#title
{
display:block;
float:left;
text-align:left;
}
#logindisplay
{
font-size:1.1em;
display:block;
text-align:right;
margin:10px;
color:White;
}
#logindisplay a:link
{
color: white;
text-decoration: underline;
}
#logindisplay a:visited
{
color: white;
text-decoration: underline;
}
#logindisplay a:hover
{
color: white;
text-decoration: none;
}
.field-validation-error
{
color: #ff0000;
}
.input-validation-error
{
border: 1px solid #ff0000;
background-color: #ffeeee;
}
.validation-summary-errors
{
font-weight: bold;
color: #ff0000;
}
/*----------------------------------------------------------
此模板的基色为#5c87b2。如果你愿意
要使用不同的颜色,请首先替换
#5c87b2和您的新颜色。
----------------------------------------------------------*/
身体
{
背景色:#5c87b2;
字体大小:.75em;
字体系列:Verdana、Helvetica、无衬线;
保证金:0;
填充:0;
颜色:#6969;
/*宽度:自动*/
}
a:链接
{
颜色:#034af3;
文字装饰:下划线;
}
a:参观了
{
颜色:#505abc;
}
a:悬停
{
颜色:1d60ff;
文字装饰:无;
}
a:主动的
{
颜色:#12eb87;
}
p、 保险商实验室
{
边缘底部:20px;
线高:1.6em;
}
/*标题
----------------------------------------------------------*/
h1、h2、h3、h4、h5、h6
{
字号:1.5em;
颜色:#000;
字体系列:Arial、Helvetica、无衬线字体;
}
h1
{
字号:2em;
填充底部:0;
页边距底部:0;
}
氢
{
填充:0 10px 0;
}
h3
{
字体大小:1.2米;
}
h4
{
字体大小:1.1米;
}
h5,h6
{
字号:1em;
}
/*此规则设置了以下标记的样式:
左表列和右表列的第一个子项*/
.rightColumn>h1、.rightColumn>h2、.leftColumn>h1、.leftColumn>h2
{
边际上限:0;
}
/*主要布局元素
----------------------------------------------------------*/
/*您可以为项目指定更大或更小的百分比
页面宽度。或者,您可以指定精确的像素宽度*/
页
{
/*宽度:自动*/
/*宽度:90%*/
左边距:自动;
右边距:自动;
}
#标题
{
位置:相对位置;
边缘底部:0px;
颜色:#000;
填充:0;
}
#收割台h1
{
字体大小:粗体;
填充:5px0;
保证金:0;
颜色:#fff;
边界:无;
线高:2米;
字体系列:Arial、Helvetica、无衬线字体;
字体大小:32px!重要;
}
#主要
{
填充:30px 30px 15px 30px;
背景色:#fff;
边缘底部:30px;
_高度:1px;/*只有IE6应用CSS属性,该属性以底划线开头*/
}
#页脚
{
颜色:#999;
填充:10px0;
文本对齐:居中;
线高:正常;
保证金:0;
字体大小:.9em;
}
/*选项卡菜单
----------------------------------------------------------*/
菜单
{
边框底部:1px#5C87B2实心;
填充:0 0 2px;
位置:相对位置;
保证金:0;
文本对齐:右对齐;
}
ul#菜单li
{
显示:内联;
列表样式:无;
}
ul#菜单李#问候语
{
填充:10px 20px;
字体大小:粗体;
文字装饰:无;
线高:2.8em;
颜色:#fff;
}
菜单a
{
填充:10px 20px;
字体大小:粗体;
文字装饰:无;
线高:2.8em;
背景色:#e8eef4;
颜色:#034af3;
}
菜单李a:悬停
{
背景色:#fff;
文字装饰:无;
}
菜单a:激活
{
背景色:#a6e2a6;
文字装饰:无;
}
ul#菜单li.选择a
{
背景色:#fff;
颜色:#000;
}
/*表单布局元素
----------------------------------------------------------*/
字段集
{
利润率:1米0;
填充:1em;
边框:1px实心#CCC;
}
字段集p
{
保证金:2x12px 10px 10px;
}
字段集标签
{
显示:块;
}
fieldset label.inline
{
显示:内联;
}
传奇
{
字体大小:1.1米;
字号:600;
填充:2px4px8px4px;
}
输入[type=“text”]
{
宽度:200px;
边框:1px实心#CCC;
}
输入[type=“password”]
{
宽度:200px;
边框:1px实心#CCC;
}
/*桌子
----------------------------------------------------------*/
桌子
{
边框:实心1px#e8eef4;
边界塌陷:塌陷;
}
表td
{
填充物:5px;
边框:实心1px#e8eef4;
}
表th
{
填充:6px 5px;
文本对齐:左对齐;
背景色:#e8eef4;
边框:实心1px#e8eef4;
}
/*杂项
----------------------------------------------------------*/
清楚的
{
明确:两者皆有;
}
.错误
{
颜色:红色;
}
#menucontainer
{
边缘顶端:40px;
}
部门名称
{
显示:块;
浮动:左;
文本对齐:左对齐;
}
#逻辑显示
{
字体大小:1.1米;
显示:块;
文本对齐:右对齐;
利润率:10px;
颜色:白色;
}
#LoginDisplayA:链接
{
颜色:白色;
文字装饰:下划线;
}
#登录显示a:已访问
{
颜色:白色;
文字装饰:下划线;
}
#登录显示a:悬停
{
颜色:白色;
文字装饰:无;
}
.字段验证错误
{
颜色:#ff0000;
}
.输入验证错误
{
边框:1px实心#ff0000;
背景色:#ffeeee;
}
.验证摘要错误
{
字体大小:粗体;
颜色:#ff0000;
}
在没有实际看到任何示例的情况下,您可以在site.css文件中尝试此操作
找到“body”类
更改或添加属性,例如width:800px
或minwidth:450px
,或者您甚至可以执行width:auto
这些通常是我在网站上使用的设置
你可能还需要和妈妈一起玩
{
padding: 5px;
border: solid 1px #e8eef4;
word-break: break-all;
}