Implement drop-shadow filtering specifically for Internet Explorer

I am currently implementing a drop-shadow filter on a curved png, and while it works perfectly in most browsers, IE seems to be the exception.

You can see the issue with the boxes on this page: (Three boxes located just below 'Yoga Sequence Builder 3 in 1:')

This is the code I am using:

.curved::after {
    content: "";
    -webkit-filter: drop-shadow(0px 6px 3px rgba(0,0,0,0.12));
    filter: drop-shadow(0px 6px 3px rgba(0,0,0,0.12));
    width: 100%;
    display: inline-block;
    height: 40px;
    position: absolute;
    bottom: -39px;
    left: 0;
}

Unfortunately, I need assistance in achieving the same effect in IE.

I have attempted to use:

filter: progid:DXImageTransform.Microsoft.Shadow

as well as:

filter: progid:DXImageTransform.Microsoft.DropShadow

Neither of these attempts have been successful :/

Answer №1

Why not consider using the box-shadow property? Let's use a circle as an example:

.circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: #3f0;
  box-shadow: 0px 5px 5px #888888;
}
<div class="circle"><div>

Also, in your given scenario, utilizing a bottom image may not be the most optimal solution. What if there is a change in width? This approach might lack responsiveness. Instead, I would recommend using the following CSS:

body {
  background-color: #ccc;
}

#box {
  position: relative;
  height: 250px;
  width: 150px;
  background-color: white;
  margin: 50px;
  z-index: 2;
}

#box::after {
  position: absolute;
  z-index: 3;
  content: "";
  width: 150px;
  height: 30px;
  background-color: white;
  bottom: -30px;
  border-radius: 00px 0px 50% 50%;
  border-top: 5px solid white;
  box-shadow: 0px 3px 2px 1px rgba(0, 0, 0, 0.2);
}
<div id="box"></div>

Answer №2

If you're looking to apply SVG filters in Internet Explorer, it is possible. I personally tested it with IE10.

div
{
width:32px;
line-height:32px;
text-align:center;
border-radius:50%;
background:#4af;
filter: url(#drop-shadow); /* applying the specified SVG filter */
}
<svg height="0" width="0" xmlns="http://www.w3.org/2000/svg">
    <filter id="drop-shadow">
        <feGaussianBlur in="SourceAlpha" stdDeviation="2.5"/>
        <feOffset dx="0" dy="0" result="offsetblur"/>
        <feFlood flood-color="#0f0"/>
        <feComposite in2="offsetblur" operator="in"/>
        <feMerge>
            <feMergeNode/>
            <feMergeNode in="SourceGraphic"/>
        </feMerge>
    </filter>
</svg>

<div>A</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

Ways to retain a variable's value beyond the scope of a loop in PHP

<?php //establishing connection with the database define('DB_HOST', 'localhost'); define('DB_NAME', 'visitor_list'); define('DB_USER','root'); define('DB_PASSWORD',''); ...

Automatic playback of the next video in a video slider

Looking to upgrade my video slider functionality - switching between videos, playing automatically when one finishes. Struggling to find a solution that combines manual control with automatic playback. My attempt: function videoUrl(hmmmmmm){ ...

Desktop froze up as modal failed to respond

I recently updated my modal to only work on screens smaller than tablets, which was successful. However, I now need it to also work on desktop size. After trying to change d-none to d-block, it still didn't work. Any suggestions? <div class="col ...

Navbar currently active does not switch when moving to a different page

I'm experiencing some issues with the Navbar on my website. I want the active tab to change as users navigate through the different pages. Since I'm using a base template, I don't want to duplicate the navbar HTML/CSS for each page, so I th ...

Tips for creating responsive scrollable columns in an HTML table with Bootstrap

I'm not a professional web designer. I attempted to create a web layout with scrollable columns containing data in anchor tags that are loaded dynamically. To achieve this, I created an HTML table structure along with a stylesheet. Here is the source ...

Using Javascript and JQuery to create an alert that pops up upon loading the page is not effective

I am having trouble making an alert show up when my website loads. The Javascript code is functional when directly included in the HTML, but once I move it to a separate file named script.js and link it, nothing happens. Can someone please help me identify ...

Convert a solo row into individual columns within a grid format

My goal is to design a grid layout where each row can be divided into columns independently, similar to the example shown below: https://i.stack.imgur.com/VFPFq.png Here's the code snippet I have been experimenting with: .container { position ...

Animate in Angular using transform without requiring absolute positioning after the animation is completed

Attempting to incorporate some fancy animations into my project, but running into layout issues when using position: absolute for the animation with transform. export function SlideLeft() { return trigger('slideLeft', [ state('void&a ...

Is it possible to attach the entered URL to an image following the text that has been inputted?

I've coded everything but the jquery part isn't working. Enter URL :<input type="text"> <button id="btn"> continue </button> <div contenteditable="true" id="bod"> Click here to start typing</div> $(document).ready( ...

Is it possible to apply a margin to <details><summary> elements?

I am struggling with adding a margin to each of the children in my nested <details> elements .container { margin: 20px; } .parent, .child { outline: none; border: none; user-select: none; cursor: pointer; } <div class="container"> ...

Adding Content Dynamically Before an HTML Element with CSS During Runtime

Let's say the HTML is defined as <div> <div class="runtime"> Some Important Text.Insert "Important" Before This </div> <div class="normal"> General Text </div> </div> Typically, t ...

Why isn't jQuery toggle working to toggle, and how can I fix my background

Hello everyone, I am new and just created this page. Unfortunately, I'm facing two issues - I don't want my background to repeat and my jQuery toggle isn't working :( I have included a snippet of my code below. Can someone please guide me o ...

Overlap of a fixed right column over a fixed sidebar in Bootstrap 4, causing it to overlap the

I am struggling to fix the layout of my website's right dark column and sidebar. I've attempted several methods, including setting fixed parameters with no success. My goal is to have the content-c class (dark column) fixed and the sidebar fixed ...

Choose a sibling element using CSS styling

As I'm developing an AngularJS component, I am on the quest to identify ANY sibling of a particular tag, irrespective of whether they are div, span, or p. I'm hoping for a CSS-native solution that resembles something along the lines of div:siblin ...

Adding dynamic text to a <span> tag within a <p> element is causing a disruption in my layout

I'm encountering an issue with a Dialog box that displays a message to the user regarding file deletion. Here's how it looks: +-----------------------------------------------------------------------+ | Delete File? ...

Looking to deactivate a particular checkbox in a chosen mode while expanding the tree branches

I encountered an issue with a checkbox tree view where I needed to disable the first two checkboxes in selected mode. While I was able to achieve this using the checked and readonly properties, I found that I could still uncheck the checkboxes, which is no ...

Encountering a parsing issue within my React program

I keep encountering a parsing error while trying to run my React application The compilation fails with the following error message: ./src/App.js Line 7: Parsing error: Unexpected token, expected "{" After reviewing my code, I couldn't find any unex ...

Maintaining uniform cell width in tables even when some data is missing

Hello, I have a webpage that dynamically displays various tables with different data sets. The issue I'm facing is that some columns do not have data, causing the tables to display at varying widths. This inconsistency in width is aesthetically unplea ...

What is the best way to initiate a new animation from the current position?

Here is my custom box: <div class="customBox"></div> It features a unique animation: .customBox{ animation:right 5s; animation-fill-mode:forwards; padding:50px; width:0px; height:0px; display:block; background-color:bla ...