Ready to customize your CSS settings?

As I continue to learn .NET Core / MVC and work on my website, I am facing a challenge with removing the white space and getting the background to cover the entire page.

Despite trying different approaches, such as setting the style for the opt-in component, I cannot seem to make the background cover the whole page. Although I only have the vendor.css file available, I attempted to modify it by adding:

background: url(images/bg.jpg) no-repeat center center fixed; 
background-size: cover;

However, the white space persists. Upon inspecting the elements using the debug console, I noticed that my component does not fully cover the page, yet I cannot locate the element responsible in my code. More details can be found at:

To address this issue, I made changes to my _layout.cshtml as follows:

<base href="~/" />
    <style>
        html {
            background: url('http://i.e.eastbay.com/wpm/100233/WebForms/EB_Event_Signup_1/FL_form-engraved_background.jpg') no-repeat center center fixed;
        }
    </style>
    <link rel="stylesheet" href="~/dist/vendor.css" asp-append-version="true" />

Despite these modifications, the padding issue persists. For more information, please visit:

If you would like to explore my git project, you can find it here: https://github.com/InnovationGB/EventOptIn

Answer №1

Alright, the reason behind those white bars is due to the implementation of bootstrap, specifically with the container-fluid class:

padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;

To solve this, navigate to your app.component.html and assign a unique id to that div:

<div class='container-fluid' id="wrapper">
    <div class='row'>
        <div class='col-sm-12 body-content'>
            <router-outlet></router-outlet>
        </div>
    </div>
</div>

Add a new rule to your add.component.css file

#wrapper, .body-content {
    padding:0;
}

To remove the white bar at the bottom, simply delete margin-bottom: 20px; from

<div class="overlay_header" style="text-align: center; margin-bottom: 20px;">
                <h1 class="overlay_header_heading"><!–– Thanks For Signing Up!--></h1>

                <p style="color: #ffffff;"><a href="https://www.eastbay.com/customerserv/help:privacyPolicy/" target="_blank" title="View our Privacy Policy" style="color: #ffffff;">Privacy&nbsp;Policy</a> and <a href="https://www.eastbay.com/customerserv/help:terms/" target="_blank" title="View our Terms of Use" style="color: #ffffff;">Terms&nbsp;of&nbsp;Use</a></p>
</div>

If HMR is still enabled, you should see the changes reflect immediately in your browser.

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

I am experiencing issues with the loading of CSS and JavaScript files in my recently created Laravel project

Recently, I received a Laravel project and successfully downloaded its configuration to get it up and running using php artisan serve. Upon attempting to access the project through localhost:8000, only the HTML content is displayed without any styling fro ...

Difficulty aligning two images in one div using HTML and CSS

Having trouble with HTML and CSS. I have a div containing 2 images - one for background and the other for an avatar image that I can't seem to center. I've tried using margin:0 auto; and display:block; but it's not working. Current HTML pag ...

Move the scroll bar outside of the div and set it to automatically overflow

My issue involves a small div with the CSS property overflow:auto;. However, when the scroll bar appears, it covers up a significant portion of the div. One possible solution is to use overflow:scroll;, but this can result in an unsightly faded scroll bar ...

Tips for properly utilizing "require" in application.css with the Skeleton framework

I am currently working on implementing the skeleton-rails CSS framework into my application. Within the app/views/layouts/application.html.erb file, I have created containers and a list nav that require styling. Following the guidelines provided by the ske ...

How to apply unique styles to multiple elements with the same class using jQuery?

How can I add different classes to multiple div elements with the same class based on their content? <div class = "flag"> Yes </div> <div class = "flag"> No </div> <div class = "flag"> Yes </div> <div class = "flag"& ...

align the text to the left in the center of the page

.center { margin: 0 auto; display: table; } .center .content { display: table-cell; } These CSS styles are used to center align the container with the class .center, while also keeping its contents (in .content) left aligned: <div class="center" ...

Having trouble with your custom accordion content in React JS not sliding open?

Check out my progress so far with the fully functioning view here This is the structure of the Accordion component: const Accordion = ({ data }) => { return ( <div className={"wrapper"}> <ul className={"accordionList ...

How to change the color of a child element using CSS inheritance

I am struggling with a css issue and need some help. .red { color: red !important; } .yellow { color: yellow; } In the context of my html document, I have the following structure: <div class="red"> red <span class=" ...

A new input field has been incorporated into the bottom section of the webpage

After including textAngular-rangy.min.js and textAngular.min.js in my JSP page (utilizing Angular JS in my application), I noticed the presence of an unexpected input field at the bottom as shown below: <input id="textAngular-editableFix-01020304050607 ...

Fixed first column in a spacious data grid

The layout I have created can be viewed in the Fiddle http://jsfiddle.net/5LN7U/. <section class="container"> <section class="field"> <ul> <li> Question 1 </li> <li> question 2 </ ...

Tips for customizing styles when an element is being dragged over in Material-UI?

If I want to alter the backgroundColor when hovering, I can utilize sx={{"&:hover":{backgroundColor:"yellow"}} Is there a way to adjust the backgroundColor on dragover? It appears that sx={{"&:dragOver":{backgroundCol ...

Align watermark content to the far left side

Having trouble getting my watermark to align properly on the left side of my website's main content. Here is how it currently looks: https://i.sstatic.net/Nfhh5.png The issue arises when I resize the screen or switch to mobile view, as the watermark ...

Creating a centered horizontal line in a table cell using CSS

element, imagine placing a line in the middle of a table cell (td) like this: To achieve this effect, you can insert a line within the td as shown in the image below: https://i.sstatic.net/Gn8tE.png This allows you to write text while keeping the line v ...

What is the best way to apply a className to a component using styled-components in React?

NavigationStyles.js import styled from 'styled-components'; export const Navigation = styled.navwidth: 100%; ; export const MobileNavMenu = styled.ul` height: 80px; .navbar_list_class { font-size: 2rem; background-co ...

What steps can I take to restore my text_field to its original dimensions?

I recently added the token-input-mac.css file to my project and noticed that my text_area has become extremely small, resembling a text input field. How can I maintain the new css styling while only adjusting the height of the text_field? Here is the toke ...

Adding spacing to Bootstrap Navbar

My bootstrap top navigation bar appears as shown below: https://i.sstatic.net/llqGh.png When I hover over each of the items labeled LOREM, it changes to this: https://i.sstatic.net/yGAd8.png How can I adjust my code so that the spac ...

Creating a professional HTML/CSS signature for optimal performance in Outlook 2016

For my email signature, I currently have an HTML coded design that includes a 400x415 dashed line with specific color specifications. However, Outlook Express 2016 is unable to display this element properly. Despite using inline CSS, it appears that CSS d ...

Is it necessary to remove every letter before moving on to the following array position?

I've been working on a script to create an animated "self-writing text" effect. However, I'm encountering an issue where each word jumps to the next one instead of smoothly transitioning by deleting each letter before moving on to the next word i ...

Minor Chrome compatibility problems with CSS alignment

As someone who is new to stackoverflow, I've always found it to be a valuable resource for answers. I've had success building HTML 5 banner ads using GSAP (Greensock Animation Platform) in the past, but now I'm facing a CSS alignment issue t ...

What could be causing my CSS to behave unexpectedly?

Here is my css code that makes a dropdown menu visible: a.menu:hover { opacity: 1; text-shadow: 0 0 10px white; } a.menu:hover ~ .dropdown { display: block; } .dropdown { display: none; width: 50px; height: 50px; position: absolute; top: 120px; left: 120 ...