The 4-column Flexbox-Layout functions perfectly on all browsers except for IE, which only displays 3 columns in a single row

Currently, I am working on coding a website with a non-responsive navigation system. The primary layout structure is based on Flexbox for column and positioning arrangements. The website displays perfectly in Firefox, Chrome, and Edge browsers, showcasing a well-organized 4-column layout in various sections such as Intro, cities, testimonials, and pricing.

However, upon opening the site in IE(11), an issue arises where it only shows 3 columns instead of the designated 4 in certain sections. Additionally, the pricing section only displays 2 columns rather than the intended 3.

I have attempted to rectify the problem by removing the column padding, which does show the correct number of columns without padding. Furthermore, I ensured that the columns have the 'box-sizing: border-box' attribute applied and utilized autoprefixer to prefix all necessary CSS3 properties.

Despite these efforts, the issue persists. If you would like to view the website for yourself, please follow this link:

You can also access the code on Codepen via this link: https://codepen.io/anon/pen/KYqVwY

.grid {
-js-display: flex;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
    flex-wrap: wrap;
}
.column {
-webkit-box-sizing: border-box;
        box-sizing: border-box;
-webkit-box-flex: 1;
    -ms-flex: 1;
        flex: 1;
}
.bigger { -webkit-box-flex: 2.5; -ms-flex: 2.5; flex: 2.5; }
.halves .column  { -webkit-box-flex: 0; -ms-flex: 0 1 50%; flex: 0 1 50%;}
.thirds .column  { -webkit-box-flex: 0; -ms-flex: 0 1 33.3333%; flex: 0 1 33.3333%;}
.fourths .column { -webkit-box-flex: 0; -ms-flex: 0 1 25%; flex: 0 1 25%;}
.fifths .column  { -webkit-box-flex: 0; -ms-flex: 0 1 20%; flex: 0 1 20%;}
.sixths .column  { -webkit-box-flex: 0; -ms-flex: 0 1 16.6666%; flex: 0 1 16.6666%; }
.sevenths .column { -webkit-box-flex: 0; -ms-flex: 0 1 14.2857%; flex: 0 1 14.2857%; }
.eights .column  { -webkit-box-flex: 0; -ms-flex: 0 1 12.5%; flex: 0 1 12.5%; }

@media (max-width: 900px) {
.grid { display: block; }
}

Answer №1

In order for the layout to display correctly in IE11, it is necessary to set a max-width that matches the flex-basis.

For instance:

.fourths .column { -webkit-box-flex: 0; -ms-flex: 0 1 25%; flex: 0 1 25%; max-width: 25%}

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 Tailwind CSS class "ring-inset" does not appear to be appearing on iPhone devices when applied to form inputs

I have implemented custom styling for form inputs in my Next.js project using Tailwind CSS classes. Below is the code snippet that showcases how I have styled the form inputs: import * as React from "react"; import { cn } from "@/lib/util&q ...

Adding a button inside a text input field in a website form with the help of html, css, and javascript

I am interested in creating a greasemonkey script that can add a button inside text entry forms on various websites to enhance their appearance. I envision the text entry forms looking like this: ____________________ Username:|___________|BUTTON ...

Error: The property 'classList' cannot be read as it is null in Flask, jinja2, JavaScript, HTML, and Bootstrap

I am currently utilizing a bootstrap button class, and upon clicking the button, I pass this.id to the caretToggle() JavaScript function. Since I have multiple bootstrap buttons that I want to toggle the caret on, I attempted the method below, only to enco ...

Alignment of text in Bootstrap Navbar

I'm looking to align text in this way: https://i.sstatic.net/6DS4q.png Here's my navbar design: https://i.sstatic.net/FZ3sg.png It's been a challenge for me, I've spent exactly 2 days trying to achieve the style similar to Max Back& ...

Transitioning from a fixed position to absolute in CSS3

Sticky Logo Element In my project, I implemented a logo element that is positioned absolutely within the document. As the user scrolls, the logo sticks to the top of the window with a fixed position (you can view an example here: https://jsfiddle.net/swzb ...

I am interested in generating a report for the protractor-html-reporter in the form of an .html file

Currently, I am conducting end-to-end testing using Protractor. To generate a comprehensive report of all the test cases, I have employed Protractor-html-reportor. This tool creates an .html file containing detailed information on each test case. Everyth ...

Disable reloading when submitting and reset input fields after submission

I am working on developing a website where users can post things and comments without the need to refresh the page. I have encountered some issues while implementing this feature and need some assistance with it. My goal is to allow users to submit comment ...

Attempting to implement bootstrap pagination using PHP mysqli

Hi there, I'm currently working on implementing a pagination feature using Bootstrap. My goal is to display all results from mySQL data while limiting the data to 10 entries per page. I would appreciate any assistance with this. Here's the code I ...

Determine if the input number exceeds a specified threshold by implementing JavaScript

My attempt at performing calculations on a page is not yielding the desired results. I have tinkered with the code below, but it doesn't seem to be working as expected. Can anyone provide guidance on where I might be going wrong? Specifically, I want ...

Modify HTML table cell colors based on their values

Hey there, I'm currently working on a project where I need to dynamically change the colors of an HTML table based on values retrieved from a database. To give you a better idea, here is an image showcasing what I am trying to accomplish. https://i.ss ...

Expanding the MatBottomSheet's Width: A Guide

The CSS provided above is specifically for increasing the height of an element, but not its width: .mat-bottom-sheet-container { min-height: 100vh; min-width: 100vw; margin-top: 80px; } Does anyone have a solution for expanding the width of MatBott ...

Enter the Kannada language into the HTML text box or input field

My html form consists of about 15 - 20 input and textarea fields. As a user, how can I enter information in Kannda or any other local language? https://i.stack.imgur.com/60PVT.png ...

Changing the Color of HTML Table Borders When Hovered Over

How can I change the color of the top and bottom border of a tr when hovering over it? The issue I am facing is that the hover styles are being overridden by the tr above it. In my example below, only the bottom border is highlighting on the second and th ...

Internet Explorer 11 encountering a syntax error with SweetAlert2

I have implemented the following code from the SweetAlert2 examples page: swal({ title: 'Are you sure?', text: "You won't be able to revert this!", type: 'warning', showCancelButton: true, confirmButtonColor: '#3085 ...

The level of transparency linked with text in a blockquote

I've spent hours on this and I'm completely lost. Even though I believe my code is correct, it keeps telling me it's wrong. I don't know where to go from here. The task requires adding a style rule for the blockquote element that chan ...

How do you implement radio button logic within an *ngFor loop?

When I populate options in a form with radio buttons, I am not seeing isChecked set to true when I select an option. Am I missing something in the following Angular code? app.component.html <div class="form-group"> <label>answerOption</la ...

Issues with displaying the grandparent of the nearest element using jQuery

I have some HTML below (generated using CakePHP): I am attempting to display the grandparent element of the closest element that was clicked: $('.what_is_the_quote_for').closest('.form-group').hide(); $('.visit_status').cha ...

The footer that constantly changes

I am looking to dynamically position my footer at the bottom of the page. The footer should be fixed at the bottom. If the page content exceeds the viewport, the footer should automatically adjust its position. html { position: relative; m ...

Is it possible to make an HTML page permanent and uneditable?

Is it possible to secure my HTML file from being edited or modified, especially in a web browser? Discover innovative techniques and gain deeper insights into web development and website design. Interested in learning more about HTML, CSS, JavaScript, PH ...

What is the alternative way to display two tables side by side in HTML without relying on the "style" tag?

For my project, I have created two tables and I am looking for a way to display them side by side without relying on inline styles. Does anyone have any suggestions on how to achieve this? ...