The full width container in Bootstrap 4 does not adjust its height to match the viewport when resized to a

In my navigation tab section, I want to display different images for each category. However, when the fiddle is resized to a smaller size, there is a large white space where the images overlap. I'm not sure how to fix this issue. Removing the height-100 property seems like a solution, but I still want to maintain a certain height for aesthetic reasons.

Here's a snippet of the HTML code:

<div class="container-fluid bg-dark h-100">
    <div class="row">
      <div class="col-md-8">
        <ul class="nav nav-tabs" role="tablist">
            <li class="nav-item">
              <a class="nav-link text-danger" data-toggle="tab" href="#tab1" role="tab">tab1</a>
            </li>
            <li class="nav-item">
              <a class="nav-link text-danger" data-toggle="tab" href="#tab2" role="tab">tab2</a>
            </li>
            ...
          </ul>

          <div class="tab-content text-white">
            <div class="tab-pane fade in" id="tab1" role="tabpanel">
              <div class="row py-2 h-100">
                  ...
                </div>
                <div class="row py-2 h-100">
                  ...
                </div>
                <div class="row py-2 h-100">
                   ...
                </div>
            </div>
            <div class="tab-pane fade in" id="tab2" role="tabpanel">
             x
            </div>
            ... // repeat for other tabs
          </div>
      </div>
      <div class="col-md-4 control">
        <div class="container-fluid">
        some content here
      </div>
      </div>
    </div>
  </div>

CSS:

html, body {
    box-sizing: border-box;
    height: 100%;
    margin: 0;
  }
.control{
    background-color:#24262D;
}

JSFiddle (With B4 and CSS): https://jsfiddle.net/yeg1dsut/9/

Thank you!

Answer №1

Opt for min height over using h-100 (equivalent to height: 100%)...

.container-fluid {
  min-height: 100%;
}

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

The versatility of Node.js' hbs module as an engine

Recently diving into the world of node js, I stumbled upon the hbs module. In this code snippet below: app.set('view engine', 'html'); app.engine('html', require('hbs').__express); I'm curious to know more abo ...

Does Google's caching process differ when using <span> tags instead of <h> tags for headings?

Does the choice between using <span class="heading"> and <h> tags impact search engine optimization for Google? As I'm constructing a website, I decided to style the headings and subheadings with <span>. However, I began to wonder i ...

Exploring the capabilities of querying HTML using XPath with Python's lxml library

After reading an HTML page as a string, I am using tree = html.fromstring(data). Now, I aim to utilize lxml xpath for querying. Here is an example of the specific part that piques my interest: <table class="class"> <tbody> <tr> &l ...

Listening for Events on Multiple Groups of Radio Buttons

How can a dynamic Javascript/JQuery event listener determine which radio button group has been clicked and retrieve the value of the checked element? If there are two radio button groups, how would you differentiate between them? How could this be achieved ...

Concealing axis lines within the initial circular grid or opting not to include them

Is there a way to incorporate some whitespace within the center circle of the radar chart? I'm aiming for the axis to commence at 1 radius (the initial circular line) or perhaps have the stoke set to 0 for the primary radius. Any assistance would be g ...

The left border is failing to appear on the Td element

When attempting to add border styling to td elements, the left border is not displaying correctly. This issue seems to vary across different browsers. Here is the HTML code: <table class="table-bordered"> <thead> <tr> ...

Submenu in submenu not registering CSS hover events

Currently, on a website project that I'm developing, there is a submenu nested within another submenu. Interestingly enough, the level-2 submenu happens to be taller than its parent level-1 submenu. To control the visibility of these submenus, I' ...

Looking for a streamlined method to submit my multiple checkbox selections to the database in a more efficient manner

I am looking for a more streamlined method to submit my multi-selected checkbox form data to my database. Specifically, I am interested in consolidating the values from the Vase Holes Value Checkbox into a single row within my database table instead of h ...

What is the best way to maintain filter selections on the subsequent page using PHP Laravel?

There seems to be an issue with filtering my user table on the page. While I can successfully filter the first page of users, when I navigate to the second page, everything reverts back to default instead of remembering the form inputs. Here is a snippet o ...

Personalize the breakpoints of Bootstrap 4's grid system

In my project, I am facing a situation where I need a 1280 breakpoint to switch from desktop to tablet, instead of the xl breakpoint at 1200 as defined in Bootstrap. How can I globally change the xl breakpoint in Bootstrap without recompiling from the sour ...

Scheduling with FullCalendar: Embracing the Unique Parallelogram Events

Is there a way to change the shape of the event from a square to a parallelogram? Here is an example in the image below: https://i.sstatic.net/hKtz7.png I attempted to modify the CSS with the code snippet below: .fc-event-container{ background-colo ...

Troubleshooting: Javascript Opacity Slider Malfunctioning on Internet Explorer

I was looking for a way to change the color of an image using a slider. I decided to tweak some Javascript code so that it alters the opacity of a different colored image layered on top of the original one as the slider is adjusted. Additionally, I incorpo ...

How can I create a jumping animation effect for my <li> element in JQuery?

I have a horizontal navigation bar with a "JOIN" option. My goal is to make the #jump item continuously jump up and down after the page has finished loading. Currently, I have this code which only triggers the jump effect once when hovering over the eleme ...

Changing the Parent div style based on checked radio input in Reactjs

As a Reactjs beginner, I am looking for assistance in changing the background color of a faculty item (.faculty) to red when the respective radio input is checked. This should be achieved using the onChange method in Reactjs. Thank you in advance for you ...

Enhancing interactivity with jQuery's ajax event functionality

Alright, let me share my code with you: $("#content_Div").ajaxStart(function () { $(this).css('cursor', 'wait') }).ajaxComplete(function () { $(this).css('cursor', 'default') }); I'm facing a simple is ...

bootstrap 4 - create a responsive two-column layout where the second column displays additional details specifically designed for mobile devices

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" crossorigin="anonymous"> <body> <div class="container"> <div class="row"> <div class="col-md-6 col-xs-12"> ...

Modify CSS when scrolling, based on the size of the screen

I've implemented this JQuery script to modify elements in my header as the user scrolls. Is there a way to limit these modifications based on the screen size? Here's the code snippet: $(window).scroll(function() { // Once the user has scro ...

Achieving centered text alignment in a span using Bootstrap 5

I am facing an issue with a span in an input group that has a minimum width of 6rem. This is causing the text to not be centered, as spans typically adjust to the width of the text itself. .input-group-text { min-width: 6rem; } <link rel="stylesheet ...

Connecting a secret parameter to a designated radio option within a form (PHP/MySQL/HTML)

I am currently building a PHP form that connects to a MySQL database. Each question in the form requires a simple yes or no answer. The challenge I'm facing is with submitting a hidden value when the user selects 'No' for a question. This ...

Problem with logo in MVC4 apps

I'm working on incorporating a logo into my MVC 4 website. When the logo is clicked, it should navigate to the home screen. In order to achieve this, I've added the following code snippet in the _Layout.cshtml file. <a href='<%= Url.A ...