Bootstrap 4 grid system: mixed column widths with fixed and variable, may experience overlapping in IE11"

Dealing with Bootstrap 4 grid challenge in IE11 when using a fixed width column

I am working on a three-column grid where the middle column needs to have a fixed width, while the left and right columns are flexible/wrappable.

Here is the code snippet I have created, including my own class for the row wrapper. The version of Bootstrap being used is 4.1.1

<div class='centered_content'>

      <div class="row">

        <div class="col-md">
           content with variable width
        </div> 

        <div class="col-md m d-none d-md-block ">
            Fixed width content
        </div> 

        <div class="col-md l d-none d-md-block">
            content with variable width
        </div> 

      </div> 

</div> 




.centered_content {
  max-width:1130px; 
  margin: auto;
}

The issue arises specifically in IE11 (as well as in the 'Internet' browser on an Android 4 tablet) when resizing the browser window from the maximum width of 1100 to around 800px (just before reaching the small breakpoint). At this point, the right column starts overlapping with the middle one in IE, whereas other browsers adjust the left and right columns to accommodate the fixed width of the middle column.

The images below provide visual representation of this problem. The first image demonstrates the appearance of the layout when the browser is maximized in IE (and all other browsers), the second image shows Chrome functioning correctly with reduced width (desired behavior), and the third image showcases the issue with IE at a reduced width.

I understand that IE doesn't fully support flex, which could be causing the problem. Edge behaves similarly to Chrome. Are there any potential workarounds for this issue?

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

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

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

Answer №1

Debating whether or not to tackle this question; however, it's worth noting that bootstrap 4 utilizes Flex (as mentioned for compatibility): IE 11 and Android 4 are considered outdated technologies that have been abandoned. It can be frustrating to still see IE 11 in logs... the amount of effort required to support IE 11 may not be justified as of (2018). Regarding @NiMusco's suggestion, using a JS powered injection for CSS specifically for IE 11 might be the only option, although it is not ideal.

Detecting IE11 using CSS Capability/Feature Detection

If broader browser compatibility is needed, reverting back to bootstrap 3 with traditional HTML, floating, and clearing could be a solution (even though it may not be perfect, it does function in IE 11).

Best of luck, but giving up on supporting IE <= 11 might be the most practical approach, especially considering Microsoft's stance on it.

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 CSS grid-template-area feature is not functioning properly in web browsers

Struggling with creating a responsive CSS grid layout for different screen sizes. I want to have five divs on desktop screens and adjust the layout for smaller screens. As a newbie in web development, I'm finding it challenging to get it right. .fir ...

Attempting to showcase a button element within a popover, although it is failing to appear

I have implemented a feature where a popover appears when hovering over an inbox icon (font-awesome). However, I am facing an issue with displaying a button on the second row within the popover. The title is showing up fine, but the button is not appearing ...

Scroll to the end of the main div's horizontal position instead of using offset().left

I'm struggling with an issue in my code. <script type="text/javascript"> $(function() { $('ul.nav a').bind('click',function(event){ var $anchor = $(this); /* ...

Masonry is experiencing compatibility issues with Bootstrap tabs

I have set up a bootstrap tab option and have also implemented masonry js. The issue I am facing is that the boxes appear differently in each tab; one appearing smaller and the other larger. The masonry layout seems to be working correctly in the first tab ...

The issue of border-radius and shadow box inconsistency

I'm trying to style a div with the following properties: .example { margin: 200px; width: 200px; height: 200px; border-radius: 20px; box-shadow: white 0px 0px 0pt 8pt, #033354 0px 0px 0pt 11pt; } <div class="example"> </div> ...

What method can I use to enlarge the carousel component from the flowbit-svelte library?

I have been working on a project that requires a Carousel, and I decided to incorporate the flowbit-svelte carousel into my svelte project. While the carousel is functioning well, I am facing an issue with the component size. It seems to be cutting off my ...

Javascript functions properly on Chrome, Opera, and Edge browsers, but unfortunately does not work on FireFox and IE 11

If you're interested, I have some code available on JS Fiddle that showcases my skills. var getJSON = function (url) { "use strict"; return new Promise(function(resolve, reject) { var xhr = new XMLHttpRequest(); xhr.open('get' ...

Updating the global CSS styles that were inherited from the node_modules folder in a Next.js project

I've been attempting to customize the CSS style for a rc-pagination component that was included in a CSS file I already imported in the root component _App. However, despite my efforts to override the styles in the index.css file of this component, no ...

CSS cascading not happening

Within the usersettings.css.erb file, line numbers are provided for easier reference. 11 #userSettingMain .form-horizontal .controls { 12 13 margin-left: 30px; 14 } 15 16 #user_birthday_3i{ 17 18 margin-left: 0px; 19 } U ...

Tips for aligning 2 columns when both table cells contain inner tables

Concerning my HTML table, cells #3 and #4 contain inner tables. I am facing an issue with aligning the rows within each table in cell #3 and cell #4 properly. Sometimes, the length of text in a row exceeds a single line, causing misalignment with the othe ...

I had hoped for the search results to be displayed in neat columns, but unfortunately only the text is formatted that

I am working on a WordPress plugin that displays search results. Here is the PHP code for the results: <?php /** * Search & Filter Pro * * Sample Results Template * * @package Search_Filter * @author Ross Morsali * @link http://w ...

What purpose does the alert-dismissible feature serve?

I am trying to implement an alert box using Bootstrap for my project <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"> </head> <body> ...

How to properly format the <address> element on my website to display our company's contact information

While developing a website with asp.net mvc-5, it's important to include our company's contact details like telephone, email, and postal address. That's why I utilized the <address> tag within our "Contact US" page, replacing actual in ...

Guide on making a persistent sidebar using CSS and JavaScript

I'm in the process of developing a website that features a main content area and a sidebar, similar to what you see on Stack Overflow. The challenge I am facing is figuring out how to make the sidebar remain visible as a user scrolls down the page. T ...

Ways to create space between rows

Here is some code structure that I'm working with: .col_1_6 { width: 70%; float: left; } .col_1_4 { width: 30%; float: left; } .row-content { clear:both; padding-bottom: 105px; } <div class="row-content"> <div ...

Issue with loading background image in HTML/CSS is being caused by a Cross-Origin Read Blocking problem

As part of my project, I need to load an image from my image hosting site by using my github repository. The CSS code I am using for this task is as follows: #main-section{ background-image : url("https://github.com/<mypath>/myphoto.jpg"); } Be ...

Identify a div that manifests within the region of another element

Greetings everyone! I have a target that shoots randomly. I'm trying to make my "winner" div appear when a shot hits the center of the target. I really appreciate any help, I've already attempted collision detection but it doesn't work si ...

Tips for getting my scripts to function properly with my components in next.js?

I am facing an issue with my script while using React and Next.js in my pages/_app.js file. The code snippet is as follows: import axios from "axios"; import { $ } from "jquery"; import App from "next/app"; import Router from ...

Using `left: initial` does not function properly in Internet Explorer

Unfortunately, the tooltip does not display correctly in IE as desired. This is how it should look (in Chrome): https://i.sstatic.net/dCM9z.png However, this is how it appears incorrectly in IE: https://i.sstatic.net/Tq6rY.png Here is my CSS code for ...

flexible design using flexbox with image overflow and responsive footer

I created a website and utilized flexbox for designing the layout. The page structure is quite simple, consisting of only 3 tags: <header> <section> <footer> [index.html] <html> <head> <link rel="stylesheet" type="t ...