Internet Explorer doesn't seem to support CSS bottom property

I am using a div to represent a lesson that is dynamically filled up with a green span based on the student's completion percentage of the lesson. The height of the span is dynamically assigned for this purpose. While this functionality works seamlessly in most browsers, it encounters an issue when viewed on Internet Explorer. In IE, the span does not start from the bottom of the div as intended, instead appearing halfway through the middle. This discrepancy can be observed in the images below, which showcase the first lesson at 100% completion and the second lesson at 25% completion:

Browsers like Chrome, Firefox, Safari, and Opera display correctly:

Issue occurs on Internet Explorer:

The HTML code I am using is:

  <div style="display:table; margin:0 auto;">

       <div class="detail_image">

            <div class="detail_image_cont">
                 <img src="images/thamatho/chapters/img.png" />  
            </div>
            <span style="height:<?php echo $completepercentage."%";?>">     
             </span>
      </div> 
 </div>

The corresponding CSS code is:

 .detail_image{  
   display: table-cell;
   border: 4px solid #39C;
   width:48px;
   height:48px;
   vertical-align: middle;
   text-align:center;
   -webkit-border-radius: 35px 35px 35px 35px; 
   -moz-border-radius:35px 35px 35px 35px;
   border-radius: 35px 35px 35px 35px;
   position:relative;
   overflow:hidden;
   background-color:transparent;
 }


 .detail_image > span {
    width: 101%;
    overflow: hidden;
    left: -0.4px;
    position: absolute;
    background-color: #CFC; 
    bottom: 0px;
    height: 0%;
    z-index:1;
  }

 .detail_image_cont{ /* to center image in the div */
    display:block;
    width:100%;
    text-align:center;
    margin:0 auto;
    position:relative;
    z-index:999;
  }

Answer №1

To improve the appearance of your span, consider applying the style of display: block.

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

Is it possible to activate Compatibility View (IE8) using code-behind?

Is it possible to include a tag in my .aspx page that will enable Compatibility View for websites when using Internet Explorer 8, without having to click on the "compatibility" icon in the browser? ...

Ways to incorporate smooth transitions to content using CSS

I recently created a website for a competition and I am looking to make the text change when a user hovers over a link. While I have managed to achieve the text change, I now want to add a transition to it. I have only used CSS to change the code. Can some ...

I'm having trouble getting my jQuery click handler to work

Here is the HTML content within my Sharepoint 2010 Web Part project: <html> <h1>Travel Form Assistance</h1> <div id="preTravel" name="preTravel"> <h2>Pre Travel</h2> <img id="imgPreTravel" name="imgPreTra ...

What is the best way to position two out of the three link tags to the right side?

This is the code snippet I am currently working with: <table> <tr> <td>&nbsp;</td> <td> <a id="btnAutoSuggest">Suggest Title</a> <a id="btnOK">OK</a> <a id ...

What is the best way to extend the width of an element within a Bootstrap column beyond the column itself?

Apologies for any language errors, but I have a query regarding Bootstrap. I am currently working on making a website responsive and I have a row with 4 columns set up like this: The "seeMore" div is initially hidden and on clicking the boxToggle element ...

The evaluation of jQuery did not function properly on the less.css file

I have a jQuery function that I am using as shown below @winheight:`$(window).height()` within my less file. However, when I compile it to CSS, I encounter a compiler error I am currently using a software called Crunch Compiler Errors You are usin ...

What is the best way to merge various sass directories into a single css file?

I have a situation where I need to compile two separate scss directories into a single css output file. When compiling a single directory, I would use the following command: sass --watch scss/template.scss:css/template.css Is there a way to combine two d ...

How can I change the padding that is being inherited from "@ .MuiAlert-icon"?

Is there a method to override the padding inherited from "@ .MuiAlert-icon"? The Chrome inspector indicates that the current padding is set to 7px. .MuiAlert-icon { display: flex; opacity: 0.9; padding: 7px 0; font-size: 22px; ...

The jQuery navbar's active class fails to function properly when an href is added

I'm facing a puzzling situation. I created a navbar using jQuery Mobile following the instructions on their official website: jQuery Mobile Navbar Demos Everything functions smoothly until I introduce href attributes in the list elements within the u ...

display complete map using full height in a bootstrap 4 row

Struggling to get the map in this column to fill the entire height within a Bootstrap4 column. After attempting to add h-100 to the row, scroll bars appeared at the bottom of the map and the bottom 10% of the page went missing. https://i.sstatic.net/epfx ...

Toggle element visibility upon clicking

<table id="selectsupp"> <tr> <td> <select id="category"> <option value="display" readonly="true">-Shop By Category-</option> <option value="all">All</option> <option val ...

Enhance your Zara shopping experience with the dynamic image zoom-in

I am currently exploring ways to replicate the image zoom-in feature seen on Zara's product pages. To see this effect in action, visit their site: Upon clicking on the image, it opens up in a popup window where it is enlarged to fit the entire screen ...

The HTML button triggers a function to execute on a different webpage when clicked

I'm facing a straightforward issue that I can't seem to figure out due to my limited experience with Angular and web development. The problem revolves around two components, namely home and dashboard. In the home.component.html file, there's ...

What impact does including lang=less in a Vue component's style have on its behavior?

Exploring ways to scope the CSS of my Vue component, I initially considered using less to encapsulate my styles. However, after discovering the scoped attribute as the recommended method, I realized that my approach needed adjustment. In my original setup ...

Tips for creating a clickable ::before image

I'm trying to create a hover effect where an image appears and is clickable when hovering over an element, similar to what is seen on many websites. For example, I want to display a bin icon when hovering over an element by using the ::before pseudo-e ...

Ways to reduce the size of images within a bootstrap carousel

I'm currently working on creating a carousel that will serve as a background image cover for my website, similar to the revolutionary slider in WordPress but without using a plugin. I am developing it specifically for my static website. The challenge ...

Looking for Protractor CSS functionalities nodes

I tried the code below but am having trouble locating the "Login" text using Protractor: <div _ngcontent-c2="" class="align-center"> <img _ngcontent-c2="" alt="Autoprax" class="ap-logo" src="/images/apLogoSmall.svg" style="width: 100%"> ...

Tips for ensuring that the footer remains at the bottom of the content and stays fixed at the bottom of the viewport

In my Django project, I am using Bootstrap 4.5 and I need the footer to be in one of two positions: 1- At the bottom of the content if the content is larger than the view height 2- At the bottom of the viewport if the content is smaller than the view hei ...

Hiding content using the "display: none" CSS property may not function properly

I am facing an issue where my html code for email templates works perfectly on all platforms except for Microsoft Outlook Desktop. The problem lies in the display of product information that is not showing correctly in Outlook. Within my code, I have keys ...

A code snippet designed to ensure uniform height for all floating div elements

Hello, I am facing an issue with resizing 20 left-floated divs of varying heights on my website. Previously, when my website was designed using pixels, a script worked perfectly for resizing them. However, after switching to a percentage-based design (% d ...