在整个屏幕上拉伸MVC Web应用程序

时间:2017-12-29 08:17:14

标签: css asp.net-mvc twitter-bootstrap asp.net-mvc-4

我正在寻找使MVC网络应用程序使用整个屏幕的设置(见图中的红线)。我很乐意发布一些代码,但由于它看起来像这样,当创建一个新项目时,我会发布一个新的MVC应用程序的开箱即用的代码。

enter image description here

我在整个项目中找到的唯一body-content实例位于Site.css中,如下所示:

body {
    padding-top: 50px;
    padding-bottom: 20px;
}

/* Set padding to keep content from hitting the edges */
.body-content {
    padding-left: 15px;
    padding-right: 15px;
}

/* Override the default bootstrap behavior where horizontal description lists 
   will truncate terms that are too long to fit in the left column 
*/
.dl-horizontal dt {
    white-space: normal;
}

/* Set width on the form input elements since they're 100% wide by default */
input,
select,
textarea {
    max-width: 600px;
}

2 个答案:

答案 0 :(得分:1)

从jumbotron上方的div中删除containerbody-content类。

更新: 它不是来自ASP.NET模板,而是来自Bootstrap: enter image description here

答案 1 :(得分:-2)

使用<div class="container-fluid body-content">Blah</div>

相关问题