Bootstrap does not have the capability to add additional background layers

I'm currently working on building a website using Bootstrap, and I have three backgrounds stacked on top of each other within separate divs. However, I'm facing an issue where only the first background is showing up and the second and third backgrounds are not displaying. This problem just appeared out of nowhere, as it was working fine before. I'm not sure if I accidentally made a mistake that caused this issue?

Here's the HTML code:

<body>

<div class="container-fluid one">
    <nav>
        <li class="nav-item">
            <a class="nav-link" href="">HOME</a>
            <br>
            <a class="nav-link" href="">OVER DE CAMPAGNE</a>
            <br>
            <a class="nav-link" href="">WORD JIJ BESPEELD?</a>
        </li>
    </nav>
    <img class="sire" src="img/Sire.png">
        <h2 class="headline">Wees geen pop,<br>
            want je valt hardop
        </h2>
        <div class="center"><img class="marionet" src="img/marionet.png">
    </div>
</div>
<div class="container-fluid two">

</div>

<div class="container-fluid three">

</div>        

</body>

And here's the CSS code:

a {
    font-family: Zing Rust Demo Base;
    text-decoration: none;
    color: white;
    font-size: 48px;
    letter-spacing: 3px;
    line-height: 1.75;
}

a:hover {
    text-decoration: none;
    color: white;
}

li {
    list-style-type: none;
}

h2 {
    font-family: Zing Rust Demo Base;
    font-size: 36px;
    color: white;
}

.headline {
    padding-top: 400px;
    padding-left: 15px;
}

.sire {
    height: 50px;
    width: 125px;
    float: right;
    margin-top: 450px;
}

.marionet {
    width: 400px;
    height: 700px;
    margin-top: -800px;
    margin-left: 570px;
}

.center {
    display: inline;
}

.one {
    background-image: url(../img/Deel1.png);
    background-repeat: no-repeat;
}

.two {
    background-image: url(../img/Deel2.png);
    background-repeat: no-repeat;
}

.three {
    background-image: url(../img/Deel3.png);
    background-repeat: no-repeat;
}

Answer №1

The reason for the empty containers is that they lack row-column pairs. To rectify this, you must insert at least one row-column pair into each container.

Once you have added these pairs, you must either populate the columns with content or specify their height. Otherwise, the columns will have a height of zero, resulting in the background images not being visible.

Here is what the code for the two empty containers should resemble:

<div class="container-fluid two">
<div class="row">
    <div class="col">
        Content <br> goes <br> here...
    </div>
</div>
</div>

<div class="container-fluid three">
    <div class="row">
        <div class="col">
            Content goes here...
        </div>
    </div>
</div>

Additionally, you have the option to include more than one column within each row.

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

What is the best way to enclose all succeeding elements with an HTML tag after a specific element?

In my project, I am integrating Vue 2 with Sanity.io and I am looking for a solution to wrap all elements that come after a specific element with an HTML tag, and then wrap this element along with the following elements with another HTML tag. For instance ...

Having difficulties creating an array due to identical id tags causing HTML to break in JavaScript

I've been grappling with this issue all day. Before delving into dynamic solutions, I'd like to create multiple divs with unique id tags or classnames rather than repeating ids. Whichever option proves simpler would be greatly appreciated. Curren ...

Changing React Phone Number input field's default style: A step-by-step guide

Is there a way to modify the appearance of the react-phone-number-input component using this npm package: https://www.npmjs.com/package/react-phone-number-input? I am working with React Hook Form and Tailwind CSS alongside this component. However, I' ...

Custom sized box causing Bootstrap Navbar to be unresponsive

I am having trouble loading the Bootstrap 3 navbar inside a .box class with specific CSS rules: .box { height: 600px; width: 320px; position: relative; border: 2px solid #eee; } Unfortunately, it is not displaying re ...

What could be causing a specific CSS class to not take effect?

Recently, I embarked on a journey to learn Django framework with Python. My main source of knowledge is a course I found on YouTube. However, I encountered an issue where the CSS and JS features were not applying to my page as demonstrated in the course. ...

Enhance the appearance of your responsive embedded video with a stylish border

I'm attempting to give a decorative border to a flexible embedded video. I've experimented with two different techniques to display the video: 1. <div class="embed-responsive embed-responsive-16by9"> <iframe class="embed-responsiv ...

Save the user input to a dedicated text file

I am working with a couple of select tags that generate an array. Previously, I was only logging the array to the console upon pressing the SUBMIT button, but now I want to save it to a separate text file. Here is my main.html code: <form method="POS ...

Ways to choose an option from a drop-down menu without the select tag using Selenium

I'm looking to perform automated testing with Selenium using Java but I'm facing an issue when trying to select an item from a dropdown list. The HTML structure does not include a select tag for the drop-down menu items (such as Auth ID and Corre ...

Assign a class to the checkbox of the first parent

I have a set of checkboxes generated using a for loop. I want the first checkbox to act as a parent, and all other checkboxes should act as children. When the parent checkbox is clicked, all child checkboxes should be checked. Although I have code to achi ...

Could someone assist me in resolving the issue of receiving empty emails from my online form submission?

Every day, I receive 6 blank emails from my contact form at the same time. Even though the form on the website is filled out correctly and all the information goes through, I still get these mysterious blank emails. I have implemented validation checks in ...

Embracing JQuery for Frontend Development with Node.js

I'm currently enhancing my node.js skills by utilizing express, and I've encountered a situation that is causing me some confusion. Essentially, when a user requests a webpage and the backend sends them the HTML page, how can I incorporate a Java ...

Achieve a full height for children without the need to specify a fixed height for the

I'm currently working on a container div that houses two child divs: the first one, positioned to align with its parent's left border, contains a series of buttons while the second one holds the main content. In essence, it operates like a tab na ...

There seems to be an issue with the fixed navigation menu in Bootstrap 4. I seem to be overlooking something that is causing this problem

I encountered an issue with my fixed navigation while using bootstrap 4. Everything works fine when hovering over non-active nav items, but it displays two bottom borders when hovering over the active nav item. I'm seeking assistance to resolve this i ...

What is the best way to extract data from dynamically generated radio buttons?

UPDATE I previously attempted the recommended adjustments in the initial response, but encountered issues with radio buttons allowing multiple selections and the label number controlling the top radio button. Subsequently, I have experimented further...I w ...

The @html.TextBoxFor model value does not appear pre-filled or set for the date type

I am using the @html.TextBoxFor method with a specified type of date. However, when rendering the view, the model value (retrieved from the database) is not being set. Here is an example of my code: <tr> <td>@Html.Label("ReferenceId")< ...

Clearing console logs in webkit: A step-by-step guide

Does anyone know how to clear the console in webkit? I have a function that displays debug data in the console, but it becomes difficult to read due to the number of lines. Is there a simple way to empty the console? When I check the console itself, I onl ...

What is the optimal choice: Using Stack with direction="horizontal" or employing display flex in React Bootstrap?

In my opinion, the two functions may seem similar, but from personal experience I tend to favor using display flex over Stack in react boostrap. I find that display flex offers more flexibility when it comes to spacing out objects. Would anyone be able to ...

Manipulate container (div) to reveal and conceal

My jQuery was working fine until I added some more divs to my HTML. I'm now trying to toggle the opening and closing of a discussion container named discussionContainer with a click on the button replyButton. Any assistance would be highly appreciated ...

Styling a numerical value to appear as currency with CSS

Is there a way to style the content of an element as currency using just CSS? It would be great to know if we can control how the value is displayed with CSS. I haven't found anything yet, so not getting my hopes up :) <!DOCTYPE html> <html& ...

Display the div when scrolling downwards beyond 800px

Is there a way to display a hidden section when scrolling down the page, specifically after reaching a point 800px from the top? I currently have an example code that may need some modifications to achieve this desired effect. UPDATE: [Additionally, when ...