IE11 not accurately calculating flex content width within a position: fixed element

Currently, I am developing a unique custom tooltip that utilizes the position: fixed property along with dynamic values for top and left to enable it to follow the mouse cursor. This tooltip features a rather intricate layout which has been constructed using flexbox. However, I am encountering an issue specifically within IE11 (although it typically supports flexbox seamlessly when employing autoprefixer). The problem arises from the width of the tooltip inexplicably collapsing as if it lacks any content.

To further investigate this matter, I have created a Codepen demonstration where I have removed all unnecessary details related to my implementation and retained only the fundamental Bootstrap layout and CSS styles. You can view this in action here https://codepen.io/ryangiglio/pen/xajLJr. Here is the simplified code:

HTML

<!-- Main content -->
<div class="container-fluid">
  <div class="row">
    <div class="col-4 text-center">
      Column
    </div>
    <div class="col-4 text-center">
      Column
    </div>
    <div class="col-4 text-center">
      Column
    </div>
  </div>
</div>

<!-- Tooltip content -->
<div class="custom-tooltip">
  <div class="container-fluid">
    <div class="row">
      <div class="col-12 text-center">
        Tooltip Title
      </div>
    </div>
    <div class="row">
      <div class="col-4 text-center">
        Column
      </div>
      <div class="col-4 text-center">
        Column
      </div>
      <div class="col-4 text-center">
        Column
      </div>
    </div>
  </div>
</div>

CSS

.custom-tooltip {
  position: fixed;
  top: 50px;
  left: 50px;
  background: white;
  box-shadow: 0 0 5px 1px black;
}

This represents how the design appears in Chrome

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

Conversely, this depicts how it appears in IE11

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

Answer №1

Regrettably, I didn't find the motivating factor behind this matter compelling enough to dedicate additional time towards resolving it. As a result, I resorted to manually setting a specific width for the .custom-tooltip class, ultimately providing a sufficient resolution that allowed me to proceed with shipping.

Answer №2

Unfortunately, the link provided is invalid due to my non-professional membership status.

Additionally, it's worth considering that altering the box-shadow property might impact the display outcome. Although unverified, I had intended on testing this hypothesis but was unable to do so.
--- Edited
Feel free to experiment with the following code snippet and ensure that the flex-direction property is properly configured.

div.custom-tooltip{ 
  display: flex; 
  flex-direction:column; 
} 
div.row{ 
  display: flex; 
  flex-direction:row; 
} 

--- REVISED ANSWER ---

/* 
I adjusted the width of tooltip box containers
to a percentage value as a workaround.
There may be an issue specific to IE11 where
it does not recognize flex properties correctly
on fixed elements, defaulting to preset values for width.

*/
div[data-tooltip-boxwidth="300"] {
 width: 20%;
}

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 are some ways to customize the text and button location for Bootstrap 5's file input?

Bootstrap 5's input type file seems too simplistic. Check it out here https://i.stack.imgur.com/VZ0h5.png I am curious about three things: Can the "Choose file" button be moved to the right? Is it possible to change the message that says "No files ...

The full width of the Html body in tailwindcss is not being completely utilized

I am new to tailwindcss and encountering a problem. Please take a look at the screenshots provided; the background color is not being applied in the navbar and the HTML body is not displaying full width on medium and small screens. What's perplexing ...

Position one div on top of another div with no gaps between them

I want to position a div element so that the bottom half overlaps another div element. You can view a basic layout here When the transform property is enabled for .overlay, the element is moved halfway down but it also shows the white space of the parent ...

Dynamic CSS Changes in AngularJS Animations

I am currently working on a multi-stage web form using AngularJS. You can see an example of this form in action by visiting the link below: http://codepen.io/kwakwak/full/kvEig When clicking the "Next" button, the form slides to the right smoothly. Howev ...

I'm noticing some significant differences in the appearance of my website when using Firefox and I can't seem to

This is my website While the site looks almost perfect in Chrome, there are some display issues in Firefox. In Firefox, all text appears centered on the page rather than within the divs where it should be. Additionally, a filter problem causes every div t ...

The selenium element for the submit button is currently not responsive to interactions

Recently, I encountered some challenges with selenium, specifically the anticaptcha API. Although I managed to resolve that issue, I am currently facing a different problem. Below is my existing code: from time import sleep from selenium import webdriver f ...

Radio buttons malfunctioning in Internet Explorer version 11

We are dealing with a web page that has been created by an ASP.NET web application. Within this page, there are multiple sets of radio buttons. Strangely, one of these sets is not functioning properly for certain users. Upon loading the page, the first but ...

Ways to modify the cursor of a disabled ImageButton on an ASP.Net webpage

Within a ListView, I have dynamically generated ImageButtons. If an image does not have a link, I want to make it disabled. In the ItemDataBound event, I attempted the following approach: img.Enabled = False img.DescriptionUrl = "javascript:void(0);" img. ...

Equal widths that adapt and respond to different screen sizes

Currently, I am in the process of transforming a 960grid 12col responsive design into HTML. There are three separate div elements, each with a width of 300px and a margin-right of 20px. Below is the code snippet that illustrates this: HTML <section cl ...

Instructions for dividing a screen into two halves, either with a 20/80 or 30/70 split, using HTML

I've set up my HTML structure like this: <div class="row"> <div class="col"> <div class="leftside"> ...content for leftside goes here... </div> </div> <di ...

As I spun four images along the outer edge of a circular border, one image came to a halt at 90 degrees, revealing its content. Now, I am looking to enlarge that particular

I managed to rotate four images around a circular border and stop one image at every 45-degree angle. However, I am struggling to enlarge the image that stops at 90 degrees on the website while still showing the content of the respective image when it reac ...

The z-index property in CSS is not functioning as expected when used with an absolute div inside a

https://i.sstatic.net/MnNQY.png Why isn't z-index working for me? I have a process div (container) Inside the process div, there are links in a row. These links are further divided into progress_number divs (large number) and progress_text divs (shor ...

Issue with readonly is preventing the ability to alter the font color of the input

I need to change the font color of a disabled input. When it is disabled, it appears gray and I want it to be black instead. I attempted to use readonly but that did not have the desired effect, and now the input is showing [object Object]. Below is my HTM ...

The results in the grid are displayed in a horizontal layout, rather than a

My grid results are not rendering as desired, appearing horizontally instead of in two columns. Attached is my current CSS and a screenshot of the issue for reference. Any suggestions on how I can achieve the layout shown in the screenshot below? .grid ...

Items within a shared container are currently displaying stacked on top of each other

I am facing an issue with my bike images and manufacturer names appearing on top of each other instead of next to each other. Despite using "col-md-12", the grid columns are not aligning horizontally as expected. How can I adjust the code so that each imag ...

Is it possible to reset the value of an input field with type "number" similar to how it can be done with type "search"?

My Bootstrap 4 form includes various types of inputs, some for numbers, some for text, and others for email. I have managed to style the text inputs to display a cancel button inside with the following code: input[type="search"]::-webkit-search- ...

Reordering tabs on a form when a date is selected through the date picker functionality

When using date picker on a form and tabbing out of the date field, the focus automatically shifts to the address bar in Chrome. However, in IE it moves to the first field. Is there a way to prevent this behavior? We need to be able to tab through the fo ...

Is there a way to utilize a Bootstrap Card and Django for loop to upload an image?

Trying to upload an image using Django within a Bootstrap Card loop, but facing an issue. Models.py and views.py code has been added: The problem is that images are not showing up in the browser, while other details like name and price are loading correct ...

Creating a flexible image layout within a container with relative positioning

I attempted to create a basic slideshow with images sliding from right to left as an animation: let slides = document.querySelectorAll('.img-container'); let l = slides.length; let i = 0; setInterval(function(){ i = (i + 1) % l; if(i == 0){ f ...

Viewing underlined text in iPhone with Bootstrap 5

Recently, I completed a project using Bootstrap version 5.1.3. Upon checking the mobile version on my iPhone XS, I noticed that all anchor tags (<a href="#">Something</a>) have underlined text. To address this issue, I attempted to re ...