2016-01-26 72 views
-4

我用Asp.Net MVC开始了一个新项目,并想知道如何删除/降低这个空白。我添加了2张照片才能看到它。删除Asp.Net新项目中的空间

enter image description here

enter image description here

我非常新的Asp.Net。有人知道如何降低空间吗?

+0

如果使用从浏览器开发工具的检查元素工具,你可以看到发生了什么生成sapce 。然后,您可以相应地定位该特定元素。你也有'hr'标签,通常用于分隔内容,你可以删除它并看看会发生什么 – Izzy

+0

你似乎是'HTML'而不是'ASP.NET'的新手。你可以使用w3shools网站来学习这些 –

回答

2

Visual Studio ASP.NET默认项目模板使用了Bootstrap。 重写宽度或从正文内容中删除容器类。

引导用这一招居中元素https://stackoverflow.com/a/114549/451668

.container { 
    /* first set a width that is smaller then the view */ 
    width: /* ...px */; 
} 

.container { 
    /* and then set the left and right margin to auto to dynamically calc the same space left and right from the container */ 
    margin-right: auto; 
    margin-left: auto; 
} 

未来阅读:http://getbootstrap.com/css/#overview-container