Issues with displaying images in IE 11 when using Flex

After testing this code, I found that it works perfectly in both Firefox and Chrome, displaying a row as expected.

https://i.sstatic.net/29wgb.png

However, when viewing the same row in IE 11, the image is not visible, and the width seems to be missing in the inspector.

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

I am seeking advice on how to ensure that the code functions correctly across all browsers, similar to its performance in Chrome and Firefox. Thank you for your help!

Below is the code snippet:

<div class="carousel-item active h-100 bg-dark text-light">
    <div class="d-flex align-items-center">
        <div class="text-center" style="flex:1;">
            <h5>First slide label</h5>
            <p>Nulla vitae elit libero, a pharetra augue mollis interdum.</p>
            <p>Nulla vitae elit libero, a pharetra augue mollis interdum.</p>
            <p>Nulla vitae elit libero, a pharetra augue mollis interdum.</p>
            <p>Nulla vitae elit libero, a pharetra augue mollis interdum.</p>
            <p>Nulla vitae elit libero, a pharetra augue mollis interdum.</p>
        </div>
        <img src="{{ url_for('static', filename='img/placeimg_320_400_animals.jpg') }}" class="d-block h-100"
            alt="..." style="flex:0;">
    </div>
</div>

Answer №1

After changing from flex to flex-grow, the problem in IE 11 was resolved.

<div class="carousel-item active h-100 bg-dark text-light">
    <div class="d-flex align-items-center">
        <div class="text-center" style="flex-grow:1;">
            <h5>Label for the first slide</h5>
            <p>No elit libero vitae, a pharetra augue mollis interdum.</p>
            <p>No elit libero vitae, a pharetra augue mollis interdum.</p>
            <p>No elit libero vitae, a pharetra augue mollis interdum.</p>
            <p>No elit libero vitae, a pharetra augue mollis interdum.</p>
            <p>No elit libero vitae, a pharetra augue mollis interdum.</p>
        </div>
        <img src="{{ url_for('static', filename='img/placeimg_320_400_animals.jpg') }}"
            class="d-block h-100" alt="..." style="flex-grow:0;">
    </div>
</div>

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 best way to create a unique background shape for Bootstrap 4 carousel controls?

Hello, I am currently working on a Bootstrap 4 Carousel where my controls are replaced by arrow images. I am attempting to create an oval-shaped background for the arrows as shown in this picture. However, I am facing issues with adjusting the border to ...

How can you alternate a button's text using jQuery?

Seeking advice on jQuery and Javascript: Take a look at this HTML snippet: <div class="quandoo-widget" id="quandoo-booking-widget"></div> <script src="https://booking-widget.quandoo.com/index.js" data-merchant-id="48554" data-theme="dark"& ...

Javascript function failing to execute upon page load

I don't have much experience with JavaScript, but I found the following code in a .htm file. The function doesn't seem to be triggering when it should; It is supposed to activate when the page is directly opened i.e www.site.com/12345.htm This ...

Issue with saving data into database using Flask and Bootstrap post request

My attempt to integrate Bootstrap forms with SQLAlchemy and Flask for adding data fields into a database is not functioning as expected. When I submit the form, it fails to redirect to the intended page. Here is an excerpt from my project_cat.py file: @a ...

How to handle CSS line wraps: enlarge the second line or determine the number of words per line specifically?

Is it possible to use CSS to control line wraps? I would like to have lines with a similar amount of words per line, or at least avoid one-word lines. Original: A few words for a very long title that will probably span two lines Desired Outcome: A few ...

JQuery Ajax: Issue with updating Total Likes for posts when Like button is clicked

There are two JQuery Ajax calls in this scenario. The first call retrieves user messages from MySQL, along with the number of likes for each message and a button for users to like the message. This initial request is functioning correctly. The second Ajax ...

Unable to modify the border color of the outline in MUI text fields

I am currently working on a React project using MUI and styled-components, but I am facing an issue with changing the outline border color of a textfield. Despite reading the documentation and attempting to overwrite the class names of the component, it do ...

Dynamic properties in JQuery

Here is the HTML DOM element I have... <input type="text" style="width: 200px;" id="input1"/> I want to make sure it stores date values. How can I specify that in the DOM element? Please provide your suggestions. Thanks! ...

Configuring the ID of Django Form in HTML

After making modifications to the Django comment form, I realized that it doesn't have an HTML ID. How can I add an HTML ID to the entire form? The reason I need the ID is to retrieve the value of a radio select using jQuery. UPDATE: I attempted the ...

PHP-powered webcasting platform

I have a client who is looking for a website that can live stream uploaded videos through search functionality. One of their main requests is to cover and record certain weekly events on camera, with the video being visible live on the website. While I am ...

Inserting multiple values into my PDO database

I am facing an issue with my code that I need help with. I am trying to include more data than just my :SteamID in my database. This function/PDO is currently executing every time someone visits my site. Working code: /*Check possible existing data*/ $odb ...

Is it possible to replicate, modify, or recycle a purely HTML and CSS component in Angular?

On my Angular website, I am looking to reuse a component across more than 30 pages. While the majority of the pages have similar CSS, the content inside varies. I know I can simply insert <app-example></app-example> on all the pages, using < ...

Adapt your Bootstrap sidebar for icon menu on small screens below 800px

My Background My experience lies primarily in PHP rather than modern CSS, particularly Media Queries. This has left me feeling uncertain about how to effectively troubleshoot CSS layout issues. Currently, I am working on developing a user dashboard templ ...

Steps to incorporate padding to a nested Angular Component by leveraging the CSS of its parent component

It is evident from the example at https://material.angular.io/components/expansion/examples that material components can be customized using the CSS of the component embedding them: .example-headers-align .mat-form-field + .mat-form-field { margin-left: ...

Change the height of a div after submitting a form using Django (Python)

I have a registration form with one submit button. Upon clicking submit, if there is an error, the height of the div increases by setting it to height:auto. However, when I click submit, it changes the height of the div (.continer). Strangely, after one ...

Discover the latest CSS styles and HTML attributes that impact the dimensions of an image

I am in the process of developing a custom jQuery plugin that will enable me to easily change the "src" attribute of an image on my website based on the width of the browser. However, I've encountered an issue where when the new image is loaded, the ...

Make sure that the webpage does not display any content until the stylesheet has been fully loaded by

I am seeking to utilize ng-href for loading different Themes. One issue I am encountering is that the unstyled content appears before the stylesheet is applied. I have created a Plunker where I made changes to Line 8 in the last 3 Versions for comparison ...

What is the best way to ensure that a canvas created using JavaScript spans 100% of the width?

Working with a canvas element generated by Javascript, see the code snippet below: http://jsfiddle.net/mtvzgnmm/ <div id="circle"></div> <script> $('#circle').circleProgress({ value: 0.75, size: 400, ...

Creating a custom Jquery function to generate a Div element instead of a Textbox in your web application

I need assistance with a jquery function that retrieves data from a JSON PHP MySQL setup. The retrieved results are currently displayed in textboxes. function showData(wine) { $('#Id').val(wine.id); $('#question').val(wine.question ...

Having trouble with GLB file loading in three.js?

My GLB file is not displaying in my Three.js world. Despite following all the documentation and tutorials, the model is not showing up. The world loads perfectly and everything works fine, except for the model not appearing. I am on a journey to create a ...