The functionality of PIE styling has ceased to work on IE9

A while ago, I created a web page specifically for IE9 with some PIE styling for a nice gradient effect. The gradient looked great initially, but as I added more features to the page, it suddenly disappeared. Even after reverting back to the original version, the gradient still wouldn't show up.

Interestingly, when the page loads, there's a brief moment where you can see the gradient before it changes to all white.

Just to add to the mystery, everything seems to be working perfectly fine in Chrome.

I'm at a loss trying to figure out what went wrong since removing all the modifications didn't solve the issue.

<!DOCTYPE html>
<html>
    <head>
        <title>Training Registration Admin</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <style type="text/css">
            hr{
                border-color: ivory; //Chrome and Safari
                background-color: ivory; //firefox and Opera
                color: ivory; //IE9
            }
            div, table{
                width: 100%;
            }
            html{
                height: 100%;
            }
            body{
                color: ivory;
                background: #000000;
                background: -webkit-gradient(linear, 0 0, 0 bottom, from(#000000), to(#48525C));
                background: -webkit-linear-gradient(#000000, #48525C);
                background: -moz-linear-gradient(#000000, #48525C);
                background: -ms-linear-gradient(#000000, #48525C);
                background: -o-linear-gradient(#000000, #48525C);
                background: linear-gradient(#000000, #48525C);
                -pie-background: linear-gradient(#000000, #48525C);
                behavior: url(stylesheets/PIE/PIE.htc);
            }
        </style>
    </head>
    <body>
        <div>
            <table>
                <tr>
                    <td style="width: 33%;text-align: center;">
                        <img src="images/traininglogo.png" />
                    </td>
                    <td style="width: 33%; text-align: center;">
                        <h1>Department Training Scheduler</h1>
                    </td>
                    <td style="width: 33%;text-align: center;">
                        <img src="images/traininglogo.png" />
                    </td>
                </tr>
            </table>
            <hr>
        </div>
    </body>
</html>

Answer №1

When it comes to implementing gradients in IE9, I have previously utilized PIE.htc, but I have discovered that using SVG files proves to be a more efficient method.

Below is an example of an SVG file:

<?xml version="1.0" ?>
<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none" version="1.0" width="100%" height="100%" xmlns:xlink="http://www.w3.org/1999/xlink">

  <defs>
    <linearGradient id="myLinearGradient1" x1="0%" y1="0%" x2="0%" y2="100%" spreadMethod="pad">
      <stop offset="0%"   stop-color="#000000" stop-opacity="1"/>
      <stop offset="100%" stop-color="#48525C" stop-opacity="1"/>
    </linearGradient>
  </defs>

  <rect width="100%" height="100%" style="fill:url(#myLinearGradient1);" />
</svg>

To implement this in your code, simply add the following:

header {
  background-image: url("svg-gradient.svg");
}

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

The carousel indicators in Bootstrap 4 are not responding to the CSS styles

I'm having trouble customizing the bootstrap 4 carousel indicators to look like the example image below. https://i.sstatic.net/Xdmim.png .carousel-indicators { width: auto; padding: 8px 18px; background-color: rgba(96,107,114,.8); ...

What is the best way to send variables to a jQuery function?

I'm trying to create a form where I can hide unnecessary lines by toggling them with buttons using jQuery. I've managed to start working on a page, but I'm concerned about having to write a separate function for each button, which could beco ...

Safari on Mac OS is experiencing issues with disappearing arrows

I am currently working on a WordPress website that utilizes the fullpage.js plugin (https://wordpress.org/plugins/wp-fullpage/). Encountering an issue with the fullpage's arrows (left and right) specifically on Safari on Mac OS: they appear and disap ...

Is your Navbar having trouble readjusting its height?

My navbar is not resizing properly when I shrink the logo image. Here's a link to the Codepen page with the full code: https://codepen.io/gabor-szekely/pen/JeMqQz I'm trying to reduce the size of the "Sino Medical" logo image in the top left co ...

Animating the scaling of a background image with JavaScript resulted in a jittery, unstable image

I'm encountering a shaking effect when I animate a DIV container with a background image using JS. How can I make the animation smoother? $('body').on('click', '#container', function() { $("#container").animate({ ...

Triggering a JQuery Toggle Button

This is the code I'm currently working with: $('.access a').toggle(function() { $('link').attr('href', 'styles/accessstyles.css'); $('body').css('font-size', '16px'); }, fu ...

`how to showcase a collection of items in a horizontal layout`

My goal is to showcase Groups in a horizontal layout, with each group displaying its members. Here's an example: Group 1: Group 2: Group 3: 1. Joe Blo 1. Bob 1. etc.. 2. Joe smith 2. Billybob 3. Joe g ...

Creating a striking Materialize Jumbotron: A step-by-step guide

Recently, I came across a sign up page that caught my eye. You can view it here. Upon inspecting the source code, I discovered that it was built using angular material design. This led me to wonder how I could achieve a similar look using Materialize.css ...

Responsive Design: Concealing a Sidebar with CSS

Seeking assistance with optimizing the layout of my app, . It currently displays a menu on the left and a login form in the center, with a graph shown to users upon logging in. Is there a way to configure it so that when accessed on iOS: 1) the left menu ...

What is the best way to input individual students' CA and exam scores into distinct fields and then calculate their total scores in a separate text field?

As a beginner in jQuery, I am looking for guidance on creating a script that calculates the Total score, Grade, Remark, and Position based on the user input of CAT score and EXAM score. The result should be displayed dynamically once both scores are entere ...

JQuery requests functioning flawlessly on one system while encountering issues on other systems

I've encountered an issue with the code on my admin page. It used to work perfectly fine on my system, but now it seems to have stopped functioning. My client urgently needs to update this page, however, when I attempt to run it, the JQuery requests a ...

Steps for deploying an ejs website with winscp

I have developed a Node.js web application using ExpressJS, with the main file being app.js. Now I need to publish this website on a domain using WinSCP. However, WinSCP requires an index.html file as the starting point for publishing the site. Is there ...

Dynamic row additions causing vanishing rows in the table due to JS/jQuery implementation

I am currently facing an issue while trying to create a table where I can add rows dynamically. Despite looking at various solutions on this topic, none of them seem to resolve the problem I am encountering. The newly added rows disappear immediately after ...

Using the onClick function to set attributes in React JS

I am currently working with 2 functions: addBookmark() and removeBookmark(). There is a variable called IsBookmarked that can be either true or false. In my JSX code related to bookmarks, it looks like this: {props.singleCompany.IsBookmarked ? ( ...

I'm noticing my table collapsing as I move around the div elements - any idea why this is happening

A challenge I am facing is creating a dynamic table where users can drag and drop colored boxes with animated transitions. While it mostly works well, sometimes the table collapses inexplicably. Here are steps to reproduce the issue: Move 100 - 400 Move 1 ...

HTML Element Split in Two by a Line in the Middle

Greetings to all, after observing for a while I have decided to make my first post here (and just to clarify, I am an electrical engineer, not a programmer). I am in search of creating a unique element in HTML where I can detect clicks on both its upper a ...

Not successfully aligning all buttons except for the initial one

HTML code snippet <div class="breadcrumbs row"> <button><a href="#">One</a></button> <button><a href="#">Two</a></button> <h1><button><a href="#">Three</a></button>& ...

Equal Height Cards in Material UI

Looking to create a row of three horizontal cards with uniform height that adapt to screen size. For example: Card A | Card B | Card C ...

Solving issues with malfunctioning Angular Materials

I'm facing an issue with using angular materials in my angular application. No matter what I try, they just don't seem to work. After researching the problem online, I came across many similar cases where the solution was to "import the ...

The browser window's location is redirected to an empty page

I'm currently working on a website that has a similar layout to this (). https://i.sstatic.net/c7I2y.png My main issue is with the code I've written to detect a click on the linkedin div and redirect accordingly. <script src="https://ajax.g ...