Bootstrap: The container's size is too small compared to its columns, resulting in an overflow issue

My container has a background image attached, but it only fits half of the columns before overflowing and cutting off the background image. I've tried using min-height, but the issue persists. The two columns are housed within a container and contain multiple rows. I can't seem to figure out why the container is not expanding along with the columns.

HTML:

<html>

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" type="text/css">
  <link rel="stylesheet" href="style.css" type="text/css"> </head>

<body>
  <div class="bg-primary text-center d-flex align-items-center h-50" style="background-image: url(&quot;projektberge.png&quot;);">
    <div class="container">
      <div class="row">
        <div class="col-lg-12">
          <h1 class="display-1 text-white">COVER</h1>
          <p class="lead text-white">Lorem ipsum dolor sit amet, consectetur adipisici elit.</p>
          <a href="#" class="btn btn-lg btn-secondary">Button</a>
        </div>
      </div>
    </div>
  </div>
  <nav class="navbar navbar-expand-md navbar-light bg-faded text-center">
    <div class="container">
      <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbar2SupportedContent" aria-controls="navbar2SupportedContent" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button>
      <div class="collapse navbar-collapse text-center justify-content-center" id="navbar2SupportedContent">
        <ul class="navbar-nav">
          <li class="nav-item active">
            <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="#">Features</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="#">Pricing</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="#">About</a>
          </li>
        </ul>
      </div>
    </div>
  </nav>
  <div class="attached" style="background-image: url(&quot;FB-1_Christopher Gusenbauer_PanoramaBahnhof.jpg&quot;);">
    <div class="h-100">
      <div class="container-fluid w-100">
        <div class="row h-100">
          <div class="col-md-8">
            <div class="row" style="height:100%">
              <div class="col-md-2 h-100 bg-primary" style="height:100%">
                <h1 class="">Summary</h1>
              </div>
              <div class="col-md-10 h-100">
                <div class="row ">
                  <div class="jumbotron jumbotron-fluid w-100">
                    <div class="container">
                      <h1 class="display-3">Jumbotron</h1>
                      <p class="lead">This is a modified jumbotron that occupies the entire horizontal space of its parent.</p>
                    </div>
                  </div>
                </div>
                <div class="container">
                  <div class="row">
                    <div class="col-md-12"></div>
                  </div>
                  <div class="row bg-primary">
                    <div class="col-md-6 bg-secondary">
                      <img class="img-fluid d-block py-3" src="https://pingendo.com/assets/photos/wireframe/photo-1.jpg"> </div>
                    <div class="col-md-6 py-3">
                      <h1 class="">Heading</h1>
                      <p class="">Paragraph</p>
                    </div>
                  </div>
                  <div class="row">
                    <div class="col-md-12 bg-primary"></div>
                  </div>
                  <div class="row"> </div>
                  <div class="row"> </div>
                  <div class="row"> </div>
                  <div class="row"> </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js"></script>
    <script src="https://pingendo.com/assets/bootstrap/bootstrap-4.0.0-alpha.6.min.js"></script>
  </div>
</body>

</html>

Answer №1

There is a known issue with Boostrap 4 alpha 6 that causes a bug.

This bug has been addressed and fixed in the upcoming Boostrap 4 beta 1 version, which is currently in development. If you are using Pingendo, you can easily switch to Bootstrap 4 beta 1 by updating the import statement at the end of your sass file to:

@import 'bootstrap-4.0.0-alpha.6-beta.1';

Answer №2

Don't forget to add the necessary Bootstrap references within your head tag.

Below are the links you need: Bootstrap Js Link

Bootstrap CSS Link

Insert them into your code like this:

<head>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.1/css/bootstrap.min.css" integrity="sha512-siwe/oXMhSjGCwLn+scraPOWrJxHlUgMBMZXdPe2Tnk3I0x3ESCoLz7WZ5NTH6SZrywMY+PB1cjyqJ5jAluCOg==" crossorigin="anonymous" referrerpolicy="no-referrer"
  />

  <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.1/js/bootstrap.min.js" integrity="sha512-vyRAVI0IEm6LI/fVSv/Wq/d0KUfrg3hJq2Qz5FlfER69sf3ZHlOrsLriNm49FxnpUGmhx+TaJKwJ+ByTLKT+Yg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

</head>

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

How to pass the id value between pages in web developmentactics?

I've been struggling to call the id value of one page in another for a while now. I assigned the id value "addedcart" to the form and tried to call it in my PHP code, but no cart value is being displayed. I'm not sure if I am calling the id corre ...

Unable to apply background color to the table header in Bootstrap 5

I'm struggling to set a background color on a bootstrap table, but it's not working for me. <table class="table table-dark table-hover"> <thead class="bg-info text-white"> <tr> ...

Interactive HTML Table in PHP Email

I am curious to know if it is possible to include a user-defined function in PHP Mail. $to = "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="ceabb6afa3bea2ab8eabb6afa3bea2abe0ada1a3">[email protected]</a>"; $mess ...

How to Center a DIV both Vertically and Horizontally with CSS Positioning?

I'm currently working on a webpage layout where I want to have a main div centered horizontally with three smaller divs inside, aligned both vertically and horizontally with equal spacing. I tried using margin: auto on an empty div to center it in the ...

Conceal flex items when there is inadequate space available

I need help with customizing my JIRA timeline chart to show information about epics in progress. When an epic spans multiple releases, there is enough space on the timeline bar to display all relevant details. However, if an epic only spans one release, th ...

Table featuring identical submit buttons in each row: initial submit button is nonfunctional (potential issue with multiple identical IDs)

My table displays product files, with the option to add notes. If a note is added, it shows in a row. If not, a text area field with a submit button appears instead. Everything seems to be working well, except for the first row without a note. After addin ...

Angular - creating adaptive HTML container with CSS styling

I am trying to achieve a layout similar to the one shown in the image. A container can have multiple elements starting within it or no elements at all. The elements always have a fixed height, and the container's height is determined by the number of ...

Ways to dynamically update a div with data from a JSON response

I'm currently in the process of developing a search platform. I have three static divs on the search results page that display certain content, all containing similar code. For example: <div id="result" class="card"> <img src="hello.png" ...

Tips for ensuring the vertical scroll bar is always visible on a div element

I need help with maintaining a vertical scroll bar on a div regardless of its height. .myclass { overflow-y: scroll; } <div class="myclass"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the in ...

The jQuery function is running double even after I cleared the DOM with the empty() method

Twice, or multiple times if going back and forth, the Jquery function is triggered. Upon loading LoginMenu.jsp, WorkOrder.jsp is loaded within a specified ID. Once WorkOrder.jsp loads, it then loads schedule.jsp in the schedule tab defined in WorkOrders.j ...

Turn off the layout rendering when refreshing a particular HTML element

Is there a way to refresh a particular HTML element without having to re-render the entire layout? I'm looking to optimize this code - any suggestions? function refreshElement() { $.ajax({ url: '@Url.Action("Index", "Prac ...

Find a new icon for the website

Currently, I am utilizing PHP to establish my favicon by employing the code snippet below: <link rel="shortcut icon" href="<?php echo "/SysFiles/img/ico/". $favicon; ?>"> While this method functions correctly on Firefox, it does not have the ...

One webpage with various states managed by the URL conducted

After conducting a thorough search, I find it challenging to identify the precise terminology for my current inquiry. Mainly, my objective is to display a particular page state (showing/hiding a div) based on the URL. On a single page containing three di ...

Creating a blurred background effect when a React portal is presented

I have implemented React portals to display a modal popup after the form is submitted. However, I am facing an issue with blurring only the background while showing the modal, similar to what is shown in picture 2. Initially, I tried using document.body.st ...

implementation of footers in dynamic web design

I'm encountering an issue while trying to implement the footer for my website. I have included two <ul> lists within the inner_footer as shown in the code snippet below. However, when I zoom in, the <ul> list inside the div element becom ...

Designing dual navigation bars with Bootstrap 4

Is it possible to achieve two different navbars using Bootstrap 4.3.x as shown in the image below? The first navbar (with "Sample Brand") fixed at the top, and the second navbar scrollable. https://i.sstatic.net/mmm0P.png I'm not certain if there i ...

Linking children to their parents in a mat tree structure

I'm looking to create a mat tree based on the provided diagram. https://i.sstatic.net/cTY2w.png So far, I've managed to design the icons and boxes, but I'm struggling with drawing the connecting lines. Can anyone assist me with this part? I ...

Combine multiple SCSS files located in various directories into a single CSS file by using NPM

In my project, there are SCSS files stored in a "static" directory. Additionally, I have application components located in a separate directory, each containing its own SCSS file. I am seeking a way to compile all of these SCSS files into a single .css fi ...

What is the best way to include an image in a PHP form along with additional attributes?

I've been attempting to upload an image with additional attributes in a HTML form using PHP. The code I have below somewhat works, but when I submit the form after selecting the file from a directory, I can see the file in my database BLOB column. How ...

Is there a method for me to retrieve the current value of top from the animation function provided here?

$(".container").animate({ top: '300px', height: '60px', width: '250px',},5000).fadeOut("fast").hide("fast"); ...