How come my container-fluid div isn't encompassing the box divs too?

I am currently in the process of creating a dice using the bootstrap grid system. Although I have not completed it yet, here is a small snippet of the code that showcases my progress. However, when I inspect my webpage using developer tools (see attached image), the container-fluid div, which encompasses all of my code, isn't appearing to contain the box divs. Can you help me understand why this might be happening? Below are links to both my HTML and CSS code.

body {
  background-color: rgb(41, 36, 36);
  text-align: center;
  font-family: 'Bungee Spice', cursive;
  margin: auto;
}

h2 {
  margin-bottom: 10%;
  margin-top: 10%;
}

.result {
  font-size: 500%;
  margin: 5% auto;
}

.box {
  width: 60%;
  height: 180%;
  /* padding-bottom: 60%; */
  background-color: yellow;
  margin: auto;
  border-radius: 10%;
}

.container-fluid {
  margin-bottom: 5%;
}


/* .circle1 {
    background-color: black;
    width: 100%;
    height: 100%;
    border-radius: 50%;
} */


/* .box-row {
    width: 100%;
    padding-bottom: 10%;
    margin: auto;
    background-color: red;
} */

@media (max-width: 1300px) {
  .result {
    font-size: 400%;
  }
}

@media (max-width: 1100px) {
  .result {
    font-size: 300%;
  }
}

@media (max-width: 991px) {
  button {
    display: block;
  }
}
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d9bbb6b6adaaadabb8a999ecf7ebf7e8">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT" crossorigin="anonymous">

<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5c3e3333282f282e3d2c1c69726e726d">[email protected]</a>/dist/js/bootstrap.bundle.min.js" integrity="sha384-u1OknCvxWvY5kfmNBILK2hRnQC3Pr17a+RTT6rIHI7NnikvbZlHgTPOOmMi466C8" crossorigin="anonymous"></script>

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Bungee+Spice&display=swap" rel="stylesheet">

<h1 class="result">Welcome, <span class="playerName"></span></h1>

<div class="container-fluid">
  <div class="row">
    <div class="col-lg-3 col-md-3 col-sm-3"></div>

    <div class="col-lg-3 col-md-3 col-sm-3">
      <h2>You</h2>
      <div class="box">
        <div class="row box-row">
          <div class="col-lg-4 col-md-4 col-sm-4 col-4">
            <div class="circle1"></div>
          </div>
          <div class="col-lg-4 col-md-4 col-sm-4 col-4">
            <div class="circle2"></div>
          </div>
          <div class="col-lg-4 col-md-4 col-sm-4 col-4">
            <div class="circle3"></div>
          </div>
        </div>

        <div class="row box-row">
          <div class="col-lg-4 col-md-4 col-sm-4 col-4">
            <div class="circle4"></div>
          </div>
          <div class="col-lg-4 col-md-4 col-sm-4 col-4">
            <div class="circle5"></div>
          </div>
          <div class="col-lg-4 col-md-4 col-sm-4 col-4">
            <div class="circle6"></div>
          </div>
        </div>

        <div class="row box-row">
          <div class="col-lg-4 col-md-4 col-sm-4 col-4">
            <div class="circle7"></div>
          </div>
          <div class="col-lg-4 col-md-4 col-sm-4 col-4">
            <div class="circle8"></div>
          </div>
          <div class="col-lg-4 col-md-4 col-sm-4 col-4">
            <div class="circle9"></div>
          </div>
        </div>
      </div>
    </div>

    <div class="col-lg-3 col-md-3 col-sm-3">
      <h2>Computer</h2>
      <div class="box">
        <div class="row">
          <div class="col-lg-4 col-md-4 col-sm-4 col-4">
            <div class="circle1"></div>
          </div>
          <div class="col-lg-4 col-md-4 col-sm-4 col-4">
            <div class="circle2"></div>
          </div>
          <div class="col-lg-4 col-md-4 col-sm-4 col-4">
            <div class="circle3"></div>
          </div>
        </div>

        <div class="row">
          <div class="col-lg-4 col-md-4 col-sm-4 col-4">
            <div class="circle4"></div>
          </div>
          <div class="col-lg-4 col-md-4 col-sm-4 col-4">
            <div class="circle5"></div>
          </div>
          <div class="col-lg-4 col-md-4 col-sm-4 col-4">
            <div class="circle6"></div>
          </div>
        </div>

        <div class="row">
          <div class="col-lg-4 col-md-4 col-sm-4 col-4">
            <div class="circle7"></div>
          </div>
          <div class="col-lg-4 col-md-4 col-sm-4 col-4">
            <div class="circle8"></div>
          </div>
          <div class="col-lg-4 col-md-4 col-sm-4 col-4">
            <div class="circle9"></div>
          </div>
        </div>
      </div>
    </div>

    <div class="col-lg-3 col-md-3 col-sm-3"></div>
  </div>
</div>

<button type="button" class="btn btn-outline-warning">Roll</button>

https://i.sstatic.net/MtmUh.png

Answer №1

It appears that the specific style meant for highlighting the dots within the yellow boxes has been taken out from the code. The main problem lies in the fact that the bootstrap grid does not automatically inherit any height, causing the height: 100% you specified to render as 0. To resolve this issue, consider setting a fixed size for .circle1 or applying a height to the row containing the dots.

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 avoid using ng-repeat for the last item being shown?

I currently have an ng-repeat loop that is dependent on an ng-if condition. Here is the specific code block: <div class="fav-prod-customised> <p ng-repeat="ingredient in product.options" ng-if="ingredient.default_quantity == 0 & ...

Transfer the data from a post request through routes following the MVC pattern

Encountering an issue when attempting to submit a post form with username and password, as an error stating Cannot POST /validateUser is displayed. The structure of my form is as follows: <!DOCTYPE html> <html> <head> <title> ...

Display images that have been uploaded on the page either as a grid view or a list of

In my Reactjs application, I am uploading multiple images to Azure Blob Storage. On a page, there is a button to open the upload form. Once the upload completes, I want to display all these images on the same page. Since the images have different aspect ...

"Choosing a div element using nth-child() method: a step-by-step guide

An HTML structure was provided which includes a section with an id of "main-content" and a class of "photo-grid". Inside this section are multiple div elements with a class of "col-1-4", each containing a link, paragraph, and image. <section id="main-c ...

What is the most effective method for implementing a background repeated image in Foundation 4 framework?

Currently, I am utilizing the foundation4 framework for my website. In order to achieve a repeating tiled background, I have crafted a custom CSS file and included the following code snippet: body { background: url(img/floorboardsbg.jpg) repeat; } Whi ...

Tips for managing the width of tr:nth-child(odd)

I am in search of a way to style my datasheets using tr:nth-child(odd). Below is the code snippet I am currently using: My main concern lies in adjusting the width. I aim for it to occupy a space that measures 200px by 400px The depth does not pose an is ...

Sending radio button value via AJAX request

Greetings and thank you for taking the time to hear out my query. I am aware that this question has been asked numerous times before (as informed by SO) but my case is slightly unique. I currently have a functional AJAX script that utilizes a dropdown menu ...

The alignment of elements varies between Internet Explorer and Firefox on websites

Whenever my site loads on Firefox, the phrase "Locate A Math Instructor" appears directly above "Private Math Teacher": This is the layout I desire. However, when viewing the same page in Internet Explorer, "Find a Maths Tutor" shifts up and to the left ...

button that decreases in size when clicked on

Currently, I am dealing with an element that functions as a button using a combination of Javascript and CSS. To better illustrate the issue, I will simplify the example by removing unnecessary details. The main problem lies in the fact that when this elem ...

Tips for avoiding cropped images on mobile websites:

I recently created a website that looks perfect on desktop but appears cropped on mobile devices. The site in question is doc.awsri.com Here are the images causing the issue: https://i.stack.imgur.com/eRJXU.png The problem arises when viewing it on a ph ...

Discover the method to retrieve the month name from an HTML Date input value

Here we have a date input field <input id="customer-date" name="customer-date" type="date" required> Accompanied by this script const customerDate = document.getElementById('customer-date').value; const dateHandler = document.getElementB ...

Validating radio buttons with JQuery for multiple sets of options

My form originally only submitted one out of eight radio buttons to a PHP $_POST super global array, so I needed some validation. Thankfully, I received help with this code: $("#form").submit(function (event) { if(!$(":radio:checked").length) ...

Is it possible to enable tab navigation for a button located within a div when the div is in focus?

I have a component set up like this: (Check out the Code Sandbox example here: https://codesandbox.io/s/boring-platform-1ry6b2?file=/src/App.js) https://i.sstatic.net/ZuxdL.png The section highlighted in green is a div. Here is the code snippet: import { ...

Troubleshooting: Issues with Mod_rewrite affecting CSS, JS, and Image functionality

Today marks my first time posting a query in this forum. I'm currently facing an issue with mod_rewrite. Below is the structure of my filesystem: site_new/stylesheets/layout.css site_new/javascript/somescript.js site_new/hallendetails.php ...

How to align a search form inline using Bootstrap 5

I have been attempting to incorporate a search form into a page using Bootstrap 5 and the code below: <div class="row mb-5"> <div class="col-lg-10 offset-lg-1"> <form class="form-i ...

Executing a cross-site scripting (XSS) simulation within a MVC4 application on Visual Studio 201

Within my MVC 4 application, I am experimenting with simulating an XSS attack. The setup involves a button and a text box that simply outputs the entered value. However, when I input <script>alert('xss')</script> into the text box, an ...

Inappropriate functionality of jQuery Code

Take a look at Demo Gallery I'm encountering some bugs that I can't seem to resolve. In Safari, there's a flickering issue when hovering over other elements In Safari and Chrome, the images are not displaying at the correct size (270x128) ...

How can you apply margin to an element within a column in Bootstrap 4?

Within a column, I have several span elements: <div class="container-fluid"> <div class="row"> <div class="col"> <span class="myClass">some text</span> <span class="myClass">some text</span> ...

Incorporate a header into the <img> request

Is it possible to include a header in a standard HTML <img> tag? Currently, we have: /path/to/image.png However, this path is actually a RESTful endpoint that requires a userID header. GET /path/to/image.png Header userId: BobLoblaw This endpoin ...

JavaScript file isn't being called by index.html

I am working on establishing a basic client/server connection using node.js modules along with a straightforward HTML page. The content of the HTML page is as follows: <script type="text/javascript" src="index.js"></script> The index.js fi ...