`Certain browsers are experiencing issues with text overlay functionality.`

I have managed to successfully create the necessary code to incorporate an image with a child element containing text overlaying the image. However, this functionality does not appear to be working on Internet Explorer (IE), and I am struggling to find a CSS workaround.

HTML

<div class="row background-lightgrey p-0 m-0 pt-4">
  <div class="col-md-6 m-0 p-0">
    <h2 class="m-4 color-orange font-weight-light">Canvas Ultipro</h2>
    <div class="ican-ultiproImage m-4">
      <img class="w-100" src="assets/images/ultipro.png" height="500" />
    </div>
    <div class="ican-ultiproImageText p-2 pl-5 m-4">
      <div class="row p-0 m-0">
        <div class="col ican-ultipProImageOverlay">
          <h2 class="ican-ultipProImageTitle">
            Canvas UltiPro
          </h2>
          <p>
            Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
            eiusmod tempor incididunt ut labore et dolore magna aliqua.
          </p>
        </div>
      </div>
    </div>
  </div>

  <div class="col-md-6 m-0 p-0">
    <h2 class="m-4 color-orange font-weight-light">Canvas Accord</h2>
    <div class="ican-ultiproImage m-4">
      <img class="w-100" src="assets/images/ultipro.png" height="500" />
    </div>
    <div class="ican-ultiproImageText p-2 pl-5 m-4">
      <div class="row p-0 m-0">
        <div class="col ican-ultipProImageOverlay">
          <h2 class="ican-ultipProImageTitle">
            Canvas UltiPro
          </h2>
          <p>
            Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
            eiusmod tempor incididunt ut labore et dolore magna aliqua.
          </p>
        </div>
      </div>
    </div>
  </div>
</div>

CSS

 .ican-ultiproImage {
    height: 500px;
 }

.ican-ultiproImageText {
    display: block;
    position: absolute;
    bottom: 0px;
    right: 0;
    color: #fff;
    background-color: rgba(107,107,107,0.6);
}

I am required to solely utilize CSS and am also incorporating bootstrap. I am having difficulties understanding why Internet Explorer is causing such a drastic shift in the layout. Setting the width of ican-ultiproImageText to auto or inherited does not seem to make a difference.

VIEW ON CHROME https://i.sstatic.net/eGZ9n.jpg

VIEW ON IE https://i.sstatic.net/Chfny.jpg

Answer №1

Try adding left: 0; to the CSS code:

.ican-ultiproImageText {
    display: block;
    position: absolute;
    bottom: 0px;
    right: 0;
    left: 0;
    color: #fff;
    background-color: rgba(107,107,107,0.6);
}

By doing this, it should fix the issue.

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

Navigating the elements within R Shiny: A comprehensive guide

Can anyone help me figure out how to access specific elements in my Shiny app using their HTML tags? In this particular example, I need to retrieve all h1 elements along with their respective labels and IDs. library(shiny) ui <- fluidPage( h1("Get" ...

Content will not render when JavaScript generates SVGs

As I delve into the world of JavaScript and SVG to create interactive graphics for a website, I've run into a puzzling issue with programmatically generated SVG paths not being drawn. Below is a sample code that highlights this problem: <!DOCTYPE ...

Click on the div to automatically insert its text into the textarea

I am looking for a way to enable users to edit their posts easily. My idea is to have them click on a link, which will then hide the original div containing their post and reveal a new div with the old text inside a textarea for editing. Despite searching ...

What is the best way to center align an element vertically in my specific situation

Struggling to vertically align elements within a div? Here's a snippet of code that might help: Here's a sample of what you might have: html <div class="test"> <a href="#"><img src="test.png"/></a> <a href="# ...

Having a newline between HTML elements can disrupt the structure of an HTML layout

It's common knowledge that in html, a newline between elements is treated as space. However, I find it quite alarming when working on responsive layouts. For instance, take a look at this example where the expected and correct behavior is achieved on ...

PHP: Using conditional statements to adjust datetime formatting for CSS styling

My title may not make sense, as I am new to PHP. I'm trying to create a custom member tag for my forum that shows "X Years of Experience" with different colors based on the number of years. For example, red for under 6 months, blue for year one, yell ...

The functionality of Jquery and JS lies in working on DOM elements as opposed to

Just to start off, I want to mention that my knowledge of JavaScript and specifically jQuery is quite limited. I've encountered an issue with some JavaScript and jQuery loading on my webpage. 1) I have written some code on JSFiddle http://jsfiddle.n ...

Aligning icons side by side using only CSS styling

I'm having trouble positioning icons next to each other horizontally and they keep stacking on top of one another. Can you please review my CSS code to see if I made a mistake? Here is the CSS: #social { top:20px; left:30px; height:32px; width:200p ...

Notify when the focus is solely on the text box

How can I display an alert only when the focus is on a text box? Currently, I am getting an alert whenever I skip the text box or click anywhere on the page. The alert even appears when I open a new tab. Is there a way to fix this issue? Thank you for your ...

the students in the row of the classroom do not share a uniform height

When using flexbox in Bootstrap 4, I noticed that my items are not the same size. The div on the left appears larger than the one on the right. How can I address this issue? <div class="row mb-0 pb-0 d-flex" style="border:1px solid red;"> <div ...

There are occasions when the Phaser sprite.kill() function fails to execute

Currently, I am developing games using Phaser and have encountered an issue with the sprite.kill() method. At times, when I invoke sprite.kill(), it appears that Phaser destroys the body for collisions/overlapping, but the visual elements (image and dragg ...

Adding a pair of labelled angled columns in a container that spans the full width is a breeze

I'm in pursuit of this: https://i.sstatic.net/HYbC1.jpg What I currently possess is: <div class="row slantrow"> <div class="row slant-inner"> <div class="col-md-6 slant-left"> <p>text</p> ...

How can I retrieve the URL for a specific location on Google Maps using latitude and longitude coordinates?

Is it possible to generate a URL using latitude and longitude coordinates that will take me directly to a Google Maps page showing that location? For instance, consider the following sample code: var lat = 43.23; var lng = 114.08; var url = 'http:/ ...

The color of the last clicked DIV is supposed to stay permanent, but for some unknown reason

I'm attempting to replicate this design in my project: http://jsfiddle.net/AYRh6/26/ However, I am facing issues with it and cannot pinpoint the exact problem in the code. I am using code for a toggle effect. Any assistance would be greatly appreciat ...

Angular JS integration for optimal Bootstrap grid alignment

Recently, I have been exploring the Bootstrap framework and experimenting with grid alignment. When working with 4 columns, W3 schools recommends using the following row setup: <div class="row"> <div class="col-lg-3"> </div> ...

What is the best way to target elements that have the contentEditable attribute set to true using CSS?

Can someone help me style table cells that have contentEditable set to "true"? I've tried various CSS selectors like td[contenteditable], td[contenteditable=true], and td[contenteditable="true"], but none seem to work. Is there a specific selector for ...

Blurry text can be a common occurrence when applying the transform(-50%,-50%) function to center

I have found a way to center a section using the following code: <div class="clock-section"> <h5 id="clock-title">We will be arriving soon</h5> <hr class="hr" id="cdhr"> </div> Here is ...

When a table's row is clicked, it will expand to reveal a secondary table

I am facing an issue with rendering a table using v-for in Vue. I want to display a subtable or more information section below a specific row when it is clicked on. My attempts to add a new tr within the existing tr have resulted in errors or the new row ...

Executing a script for every row in a table using Python and Selenium

As a newcomer to Python and Selenium, I have been struggling with a specific task for days now. Despite my efforts to search and experiment, I find myself completely stuck. My goal is to access sales records within a table that contains information about ...

When resizing the window in IE8, the function DIV offsetWidth/Width/innerWidth returns a value of zero

My page is filled with many elements, one of which is the following DIV: <div id="root"> .................. <div id="child1"> ............. </div> <div id="child2"> ............... </div> & ...