HTML母版页 - 试图删除空白区域

时间:2017-01-31 16:30:25

标签: html asp.net

我一直在为我的ASP.NET类设计这个网站,而且我遇到了一些空白的问题......我已经到处检查是否有任何中断,边距或填充可能导致它和我不能为我的生活搞清楚。空白区域显示在母版页的某个位置,因为我有一个完全空白的webform引用它(尽管那些内容做同样的事情)。空白区域显示在最顶部,在超大屏幕上方。任何帮助将不胜感激。

%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="MANHammerStudios.SiteMaster" %>

<!DOCTYPE html>

<html lang="en">
<head runat="server">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><%: Page.Title %>MANHammer Studios</title>

<asp:PlaceHolder runat="server">
    <%: Scripts.Render("~/bundles/modernizr") %>
</asp:PlaceHolder>
<webopt:bundlereference runat="server" path="~/Content/css" />
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
 <style>
    /* Remove the navbar's default rounded borders and increase the bottom margin */
    .navbar {          
        border-radius: 0;
        text-align: center;
    }

    ul.nav.navbar-nav {
        display: inline-block;
        float: none;
    }

    /* Remove the jumbotron's default bottom margin */
    .jumbotron {
        background-image: url('Assets/1.jpg');
        height: 300px;           
        background-position:center;            
        background-size: cover;
        background-repeat: no-repeat;
        margin-bottom: 0;
    }
    h2{
        color:firebrick;
    }
    h3{
        text-align:center;
    }
    h1 {
        text-shadow: -1px 0 white, 0 1px white, 1px 0 white, 0 -1px white;
    }
    body {
        background: transparent;
    }

    html {
        background-image: url('Assets/bgMC.jpg');
        background-position: center;
        background-size: cover;
        background-repeat: repeat;
        margin-bottom: 0;
        padding: 0;
    }


    /* Add a gray background color and some padding to the footer */
    footer {
        padding: 50px;
        margin-bottom: 0;
    }
</style>
</head>
<body>
<form runat="server">
    <asp:ScriptManager runat="server">
        <Scripts>
            <%--To learn more about bundling scripts in ScriptManager see http://go.microsoft.com/fwlink/?LinkID=301884 --%>
            <%--Framework Scripts--%>
            <asp:ScriptReference Name="MsAjaxBundle" />
            <asp:ScriptReference Name="jquery" />
            <asp:ScriptReference Name="bootstrap" />
            <asp:ScriptReference Name="respond" />
            <asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" />
            <asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" />
            <asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" />
            <asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js" />
            <asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js" />
            <asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js" />
            <asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js" />
            <asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js" />
            <asp:ScriptReference Name="WebFormsBundle" />
            <%--Site Scripts--%>
        </Scripts>
    </asp:ScriptManager>
<div class="jumbotron">
    <div class="container2 text-center">
        <h1>MANHammer Studios</h1>
        <p style="text-shadow: -1px 0 white, 0 1px white, 1px 0 white, 0 -1px white;">Miniature Painting Service</p>
    </div>
</div>

1 个答案:

答案 0 :(得分:1)

Site.css,您有:

body {
    padding-top: 50px;
}

在您.jumbotron的{​​{1}}课程中,您有:

Site.master

你的70px!

删除这些行,页面顶部的70px将会消失。