Eliminating the blank space at the top of the page

I am seeking guidance on how to eliminate the blank space above my login page. I cannot pinpoint exactly where this space is originating from. When I integrated a login page into my MVC project, I noticed an empty space at the top of the page that I want to remove.

For reference, please see the screenshot https://i.sstatic.net/hpjZm.png

checkLogin.cshtml


@{
    ViewBag.Title = "checkLogin";
}

@using (Html.BeginForm("checkLogin", "Home", FormMethod.Post))
{
    <div class="limiter">
        <div class="container-login100">
            <div class="wrap-login100">
                <form class="login100-form validate-form">
                    <span class="login100-form-title p-b-26">
                        kosmoanuaf
                    </span>
                    <span class="login100-form-title p-b-48">
                        <i class="zmdi zmdi-eye"></i>
                    </span>

                    <div class="wrap-input100 validate-input" data-validate="Valid email is: <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f091b092de93">[email protected]</a>">
                        <span class="btn-show-pass">
                            <i class="glyphicon glyphicon-envelope"></i>
                        </span>
                        <input class="input100"  type="text" name="username" required/>
                        <span class="focus-input100" data-placeholder="Email"></span>
                    </div>

                    <div class="wrap-input100 validate-input" data-validate="Enter password">
                        <span class="btn-show-pass">
                            <i class="zmdi zmdi-eye"></i>
                        </span>
                        <input class="input100" type="password" name="password" required/>
                        <span class="focus-input100" data-placeholder="Password"></span>
                    </div>

                    <div class="container-login100-form-btn">
                        <div class="wrap-login100-form-btn">
                            <div class="login100-form-bgbtn"></div>
                            <button class="login100-form-btn">
                                Login
                            </button>
                        </div>
                    </div>

                    
                </form>
            </div>
        </div>
    </div>
}

_Layout.cshtml (master page)

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="~/Content/bootstrap.css" rel="stylesheet" />
    <link href="~/Content/font-awesome.css" rel="stylesheet" />
    <link href="~/Content/custom.css" rel="stylesheet" />
    <link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />
    <link href="~/Content/Site.css" rel="stylesheet" type='text/css' />

    @*login page*@
    <link rel="icon" type="image/png" href="images/icons/favicon.ico" />
    <link href="~/Content/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="~/fonts/font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
    <link href="~/fonts/iconic/css/material-design-iconic-font.min.css" rel="stylesheet" type="text/css" />
    <link href="~/vendor/animate/animate.css" rel="stylesheet" type="text/css" />
    <link href="~/vendor/css-hamburgers/hamburgers.min.css" rel="stylesheet" type="text/css" />
    <link href="~/vendor/animsition/css/animsition.min.css" rel="stylesheet" type="text/css" />
    <link href="~/vendor/daterangepicker/daterangepicker.css" type="text/css" rel="stylesheet" />
    <link href="~/vendor/select2/select2.min.css" rel="stylesheet" type="text/css" />
    <link href="~/Content/util.css" rel="stylesheet" type="text/css" />
    <link href="~/Content/main.css" rel="stylesheet" type="text/css" />

</head>
<body>
    <script src="~/Scripts/jquery-1.10.2.js"></script>
    <script src="~/Scripts/bootstrap.min.js"></script>
    <script src="~/Scripts/jquery.metisMenu.js"></script>
    <script src="~/Scripts/custom.js"></script>


    @RenderBody()

    @*login page*@
    <div id="dropDownSelect1"></div>
    <script src="~/vendor/jquery/jquery-3.2.1.min.js"></script>
    <script src="~/vendor/animsition/js/animsition.min.js"></script>
    <script src="~/vendor/bootstrap/js/popper.js"></script>
    <script src="~/Scripts/bootstrap.min.js"></script>
    <script src="~/vendor/select2/select2.min.js"></script>
    <script src="~/vendor/daterangepicker/moment.min.js"></script>
    <script src="~/vendor/daterangepicker/daterangepicker.js"></script>
    <script src="~/vendor/countdowntime/countdowntime.js"></script>
    <script src="~/Scripts/main.js"></script>

    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/bootstrap")
    @RenderSection("scripts", required: false)
</body>
</html>

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 
   truncate terms that are too long for the left column 
*/
.dl-horizontal dt {
    white-space: normal;
}

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

Could someone advise me on removing the excess space at the top of the page? Which aspect should I address to achieve this?

Answer №1

Upon examination, I have identified a potential problem in the body's CSS as shown here.

Answer №2

give it a shot:

body { 
   margin-top: 10px; 
   margin-bottom: 30px;
}

adjust the margin-top to 10px for body or delete it altogether.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Tips for adding additional text within a span element correctly

Looking for suggestions on how to create a post box with '#' tag feature using HTML. Here is the current code I have: $("#textinput").click(function() { setCursor("textinput", 0); $(this).css("opacity", "0.5"); }) // Rest of the JavaScr ...

My custom class is adding the Bootstraps class

Dealing with multiple tables of the same size can be a hassle when adding individual classes to each one. Is there a way to apply multiple Bootstrap classes to one class in the stylesheet? For example, using <table class='table table dark> curre ...

Should the value exceed the designated width of the combobox, it should be displayed across multiple lines

Having an issue where, when I set the width of the combobox and the value inside it is longer than expected, the full value isn't displayed. I am considering displaying the value on multiple lines to ensure the entire content is visible. Unfortunatel ...

Tips on utilizing PHP DomDocument with script tags embedded with HTML code

I am currently in the process of saving a website for offline viewing, and I am encountering some challenges with DOM manipulations (wget just isn't cutting it for what I need to accomplish...). I have observed that web pages containing tags with uni ...

Step-by-step guide on programmatically activating a radio button

I am working with a radio button and input field. I need the ability to programmatically toggle the radio button so that when this.iAreaOfCoverageForThresholdPasser.average-height is set to true, the radio button appears highlighted. Snippet of HTML: < ...

Is it possible to enable a button as soon as input is entered?

I'm encountering a minor issue with my button's functionality. I am attempting to have the button enabled as soon as text input is entered into the text field, but currently it only becomes enabled after the focus has changed from the text field. ...

Looking for search suggestion functionalities in an HTML input field

I am currently working on a website project and have a database filled with recipes to support it. The issue I am facing is related to the search feature on my webpage. At the top of the page, there is a textarea where users can input their search queries ...

The play button on the video control appears blurry in iOS 9.3.2

My iPhone running iOS 9.3.2 is experiencing a display issue when I try to open an HTML page with a video tag. There seems to be a blurry initial play button as shown in the image. Any suggestions on how to fix this? https://i.sstatic.net/RmLMI.png .vid ...

Exploring the overlapping row heights in the Bootstrap 4 grid by utilizing the collapse class

https://i.sstatic.net/xS23t.png Imagine having a grid with columns like in the left image using Bootstrap 4, and then collapsing card 1 with Bootstrap collapse. I expected grid 3 to overlap the height of the row (resulting in the image on the right). I&a ...

The state remains unchanged when clicking on the div element

I am encountering an issue when trying to change the data attribute data-sort of a clicked DIV. Despite my efforts, I can only seem to get the value "DESC" each time. How can I successfully modify the data-sort attribute based on user interaction? jQuer ...

Make sure the 'card-title' is positioned directly before a div element

How can I align the 'title' to start right above 'first yeah', with the image positioned accordingly? https://i.sstatic.net/fyI2o.png I've attempted various methods (including using classes) but have been unsuccessful so far Her ...

Is it feasible to implement endless (limited?) scrolling on a stationary html page using Javascript?

I am looking for a way to dynamically fetch sections of large HTML files stored in S3 and display them using JavaScript. Is there a method where I can fetch a portion of an HTML file, show it on the page, then load the next part as the user scrolls down? ...

What's the simplest method for adjusting the default font in Reactstrap?

Currently working on a MERN project and I want to customize the font used by Reactstrap for my React frontend. While I've come across solutions for altering Bootstrap 4's default fonts, I'm unsure how to implement them in Reactstrap. Any gui ...

How should we measure the string as if it were in HTML?

I have the exact string : 123.. I am curious to know what its length would be as a SPAN element on an HTML page. font-name:arial font-size:16px; I decided to conduct an experiment: http://jsbin.com/axezib/edit#preview This resulted in: <span style ...

"Troubleshooting: CSS class name not being recognized by PHP

Here is the code snippet I am working with: echo "<table> <tr> <td class="tablehead">Name </td> <td class="tablehead">Email </td> <td class="tablehead">Comment </td> </tr> ...

What is the best method to conceal the tooltip using the html <a> title attribute?

Is there a way to prevent the tooltip from displaying when hovering over links, while still keeping the title attribute for SEO purposes? I have come across suggestions like using jQuery with $('...').removeAttr('title'), but will this ...

Tips for assigning a string value to an <li> element with Jquery

I have a database table structured as follows: ID name aa1 Tom bb2 Jack cc3 Mike To display this data in an HTML format, I am using Ajax to pass the values. $.ajax({ ... success: function (data) { $.each(data, f ...

Can a single div have three different border-bottom styles?

Can three border-bottom styles be applied to a single div element? This is the desired appearance: ...

Load an external page, automatically update the URL in the browser, and ensure that the page remains in place even if

I am in the process of creating a website demo using Bootstrap 3 to ensure compatibility with IE7/8. The fixed navigation features 4 menu anchors that lead to landing pages for different subjects, each with dropdown menus containing a varying number of sub ...

Shifting an icon to the left with CSS

.panel { margin-bottom: 20px; background-color: #F7FAFE; border: 1px solid transparent; border-radius: 4px; -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05); box-shadow: 0 1px 1px rgba(0, 0, 0, .05) } .panel-default { padding: 1 ...