Can flex-basis be used with percentage in IE11?

Encountering an issue with flexbox and IE10/11. Trying to utilize min-width/max-width values, but IE11 is not cooperating. Discovered flex-basis and used a percentage value, which functions as intended in Chrome but fails in IE11.

Experimented with adding flex-direction row and column, but still no success.

/* List */

.c-collist {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  -ms-flex-wrap: wrap;
  /*width: -webkit-fill-available;*/
  margin: 0 auto;
}


/* Listitem */

.c-collist>li {
  position: relative;
  flex-basis: 45%;
  flex-shrink: 0;
  margin: 0 auto;
  padding: 1rem;
  text-align: center;
}
<h4>Features</h4>
<ul class="c-collist t-name">
  <li>
    <img src="/pics/icon/e-5w92w-05-grww-000.svg" width="100" height="100" alt="Schalten" />
    <div class="c-flextext">
      <h5>Schalten</h5>
      <p>Ihr Smartphone wird genauso zur Schalt&shy;zentrale wie der Browser Ihres PCs. Je nach Modell schaltet das Web-IO in klassischer 24V Automatisierungs&shy;technik, mit potential&shy;freien Kontakten oder direkt 230V.</p>
    </div>
  </li>
  <li>
    <img src="/pics/icon/mqtt.svg" width="64" height="64" alt="IoT-Gateway" />
    <div class="c-flextext">
      <h5>MQTT und REST</h5>
      <p>Durch die Unterstützung von MQTT und REST ist das Web-IO 4.0 ideal vorbereitet für IoT-Lösungen und Industrie 4.0.</p>
    </div>
  </li>
  <li>
    <img src="/pics/icon/e-5w92w-08-grww-000.svg" width="100" height="100" alt="Melden" />
    <div class="c-flextext">
      <h5>Alarmierung</h5>
      <p>Ein potentialfreier Kontakt oder Grenzwert&shy;schalter reicht aus, damit das Web-IO im Ernstfall per E-Mail die zuständigen Mitarbeiter informiert. Weitere Alarmierungs&shy;möglichkeiten sind SNMP-Trap, TCP-Meldung, MQTT-Publish und mehr.</p>
    </div>
  </li>
</ul>

Comparison with Chrome:

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

Comparison with IE11:

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

Managed to work in IE11 using a pixel value like 250px. However, a media query setting width to 100% on mobile does not work, and I prefer avoiding a fixed pixel value for mobile view.

Answer №1

For maximum safety when using IE11, it is recommended to stick to the basics.
This simple code should work perfectly:

/* List */

.c-collist {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  
  list-style-type: none;
  padding: 0;
}


/* List item */

.c-collist li {
  width: 45%;
  padding: 1rem;
  text-align: center;
}

@media screen and (max-width: 768px) {
  .c-collist li {
    width: 100%;
    margin: 0 auto;
    max-width: 520px;
  }
}
<h4>Features</h4>
<ul class="c-collist t-name">
  <li>
    <img src="/pics/icon/e-5w92w-05-grww-000.svg" width="100" height="100" alt="Schalten" />
    <div class="c-flextext">
      <h5>Schalten</h5>
      <p>Ihr Smartphone wird genauso zur Schalt&shy;zentrale wie der Browser Ihres PCs. Je nach Modell schaltet das Web-IO in klassischer 24V Automatisierungs&shy;technik, mit potential&shy;freien Kontakten oder direkt 230V.</p>
    </div>
  </li>
  <li>
    <img src="/pics/icon/mqtt.svg" width="64" height="64" alt="IoT-Gateway" />
    <div class="c-flextext">
      <h5>MQTT und REST</h5>
      <p>Durch die Unterstützung von MQTT und REST ist das Web-IO 4.0 ideal vorbereitet für IoT-Lösungen und Industrie 4.0.</p>
    </div>
  </li>
  <li>
    <img src="/pics/icon/e-5w92w-08-grww-000.svg" width="100" height="100" alt="Melden" />
    <div class="c-flextext">
      <h5>Alarmierung</h5>
      <p>Ein potentialfreier Kontakt oder Grenzwert&shy;schalter reicht aus, damit das Web-IO im Ernstfall per E-Mail die zuständigen Mitarbeiter informiert. Weitere Alarmierungs&shy;möglichkeiten sind SNMP-Trap, TCP-Meldung, MQTT-Publish und mehr.</p>
    </div>
  </li>
</ul>

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 most effective method for enlarging elements using Javascript?

I have come across many different methods for expanding elements on webpages, such as using divs with javascript and jquery. I am curious to know what the most optimal and user-friendly approach is in terms of performance, among other things. For instance ...

Making the Bootstrap 4 card-footer expand to occupy the remaining height of the column

I'm currently developing a project that incorporates bootstrap cards. There are 3 cards, each for a different column, and I need them to have equal heights. Here is how they currently look: https://i.sstatic.net/Nau98.png The B and C cards should oc ...

Ways to stop a hyperlink from executing on confirmation cancel using jquery

I'm having trouble with a link that should not perform any action when the cancel button is clicked. I've attempted to use false in the click event and also tried using e.preventDefault, but I'm unsure if I am implementing it correctly. Can ...

Emphasize the most recent file during the document upload process and ensure the scroll bar moves accordingly to the document

I am currently working on a feature where the scroll bar should move to the newly uploaded document in a list of documents. When I upload a new document, I want the scroll bar to automatically move to that document. Currently, the highlighting changes to t ...

Fill the drop-down menu with the present day's date, month, and year

I'm new to this, so please bear with me. I have some html and jQuery code: $(document).ready(function() { var d = new Date(); var month = d.getMonth() + 1; var year = d.getFullYear(); $("#month").val(month); $("#year").val(year) ...

JavaScript/CSS manipulation: The power of overriding animation-fill-mode

When animating text using CSS keyframes, I use animation-fill-mode: forwards to maintain the final look of the animation. For example: #my-text { opacity: 0; } .show-me { animation-name: show-me; animation-duration: 2s; animation-fill-mod ...

The background image is not displaying properly within a <span> tag

I am attempting to show a smiley icon within a span tag that is nested inside a list item. Below is the code snippet: <p> It contains various tabs:{" "} <li> Home - Showcase and brief informati ...

Displaying an interactive 2D floorplan in a web browser with the use of html5 and javascript

In the process of updating my old Flash viewer, I am looking to display interactive 2D floorplans exported from AutoCAD. Currently, I convert the AutoCAD files into XML files containing the X and Y coordinates of the various elements on the floorplan such ...

Reducing the Size of Sprite Images on Websites

I am working on a web page that contains an image file called sprites.png. This file holds multiple images within it. Specifically, there is one image in the file that is 48px x 48px. In my CSS, I am referencing this image like so: .cell-back { height:3 ...

What methods can be used to conceal a div when the content is not being shown?

I'm a beginner in HTML and CSS and I have a page with the following code: Content displayed : <div id="row-3" ><!-- Row 3 starts here --> <div class="groupz_column1" style="margin-right:0px;"><a href="http://www.xyz.in/ads/ ...

Is there a way to simultaneously apply the :active pseudoclass to multiple elements?

<div id="a">A</div> <div id="b">B</div> <div id="c">C</div> <style> #a, #b, #c { height: 100px; width: 100px; background-color:red; font-size: 100px; margin-bottom: 20px; } ...

Can I be detected for using text expanders or copying and pasting text into a form before submitting it?

As part of my job, I write messages in text boxes on a non-secure website interface for a company. Working from the comfort of my own home on my personal PC using Google Chrome, without any spy programs installed. The company prohibits pasting messages, b ...

Stop the duplication of the HTML content to ensure only one copy is saved

Recently, I have been coding a feature that saves the HTML of the currently displayed page to another file upon pressing a button. However, I encountered an issue where if the button is pressed multiple times quickly, the saved file contains incorrect HTML ...

Ways to adjust dimensions depending on zoom level or screen size

Here is the HTML code snippet: <div id="divMainFirst"> <div id="divInnerFirst"> <div id="divTitleHeaderUC"> <span id="spanTitleHeaderUC">Urgent Care Wait Time</span> </d ...

I seem to be having trouble getting my style to work properly with Material UI's makeStyles

I am experiencing an issue with Material-UI makeStyles not working properly. I am trying to apply my CSS style but it doesn't seem to be taking effect. I suspect that Bootstrap or MaterialTable might be causing this problem. While Bootstrap4 works fin ...

Is it common for functions to be outlined in standard CSS practices?

I am curious if the CSS standard includes definitions for "functions"; I have not come across any information about them on w3schools or other sources. When I refer to "functions," I am talking about calls such as rgb(int, int, int) or url(string) that ar ...

Clicking on a JQuery dropdown menu will always result in it staying open

After creating a dropdown menu click, I noticed some strange behavior. When I click the dropdown button, the menu appears as expected. However, if I move my cursor away without clicking the button again, the dropdown menu disappears and behaves like a hove ...

Utilize Flexbox to arrange elements in a column direction without relying on the position property in CSS

Flexbox - align element to the right using flex-direction: column; without relying on position in CSS Hello everyone, I am looking to move my row element to the right without using positioning. This code includes flex-direction: column; and I do not have ...

Using AngularJS ng-style to set dynamic background images for different variables

Excuse me if this is a basic question. I am working on designing a login page with a background image, while the other pages don't have this background. I tried using ng-style but couldn't get the style to update when navigating between pages. In ...

Modifying the color of the highlighted selection in a dropdown select box

Is it possible to change the blue highlight on this dropdown to gray? Check out this demo of a select box I am aiming to alter the highlight color to gray, can someone help me achieve this? select { border: 0; color: #EEE; background: transparen ...