Problems with Text Gradients in Edge and Safari

My attempt at creating a text gradient in WordPress (utilizing SiteOrigin pagebuilder) is not successful in Edge or Safari; the text appears colorless in both browsers.

I have experimented with the following recommendations: CSS3 Text Gradients not working? Gradient not working in Safari

Unfortunately, these solutions only resulted in a linear background gradient rather than a text gradient.

Below is the code I am currently using:

<style>
.flip-up {
  /*background: linear-gradient(90deg, #97b3e1ff, #c5c95df0);*/
    background-image: linear-gradient(90deg, #97b3e1ff, #c5c95df0);
    -o-background-clip: text;
    -ms-background-clip: text;
    -moz-background-clip: text;
  -webkit-background-clip: text;
    -o-text-fill-color: transparent;
    -ms-text-fill-color: transparent;
    -moz-text-fill-color: transparent;
  -webkit-text-fill-color: transparent;
}
</style>

The functionality of the text animations has been independently tested (via the Scroll Triggered Animations plugin); they operate correctly in all major browsers, ruling out that as the issue. My website can be accessed at (issues are observed in headers like "Affordable and Effective"). Any assistance would be greatly welcomed!

Moreover, if achieving this seems unattainable, is there a method to display solid-color text solely in Edge and Safari, while maintaining a gradient effect in other browsers?

Answer №1

To achieve a color gradient effect on text, you need to set the display: block; property on the element containing the text.

Keep in mind that this change might require adjusting vertical alignment with the line-height attribute and horizontal alignment with text-align.

Interestingly, Safari and Edge specifically require this method for proper rendering - no need to understand why, just implement it!

Check out a simple example of this technique in action using the logotype in this pen.

If you encounter any issues in Safari, be prepared for how differently a service like Lambda Test could render it.

HTML Structure

<body>
    <header>
      // Header content...
    </header>
        
    <article>
        <section id="redpage" class="redpage band">
            // Red page content...
        </section> 
        <section id="whitepage" class="whitepage band hidden">
            // White page content...
        </section> 
        <section id="bluepage" class="bluepage band hidden">
            // Blue page content...
        </section> 
    </article>
        
    <footer>
      // Footer content...
    </footer>
</body>

CSS Styling

/* CSS code block... */

JavaScript Functionality

// JavaScript function... 

Answer №2

flex and inline-flex seem to be causing the issue. The text gradient does not appear when flex elements are used. Consider using block or inline-block instead.

Apologies, I have been relying on TailwindCSS extensively.

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

Creating a Large Image with Boostrap - Enhancing Position and Responsiveness

How can I make an image float to the right of the page, resize in Large and Medium screens, and vanish in Small and Xtra Small screens? I know how to hide the image using hidden-sm and hidden-xs in bootstrap, but I'm struggling to get the large image ...

What is the reason behind the malfunctioning of this navigation menu?

This is a responsive navigation bar created using bootstrap. The issue I am facing is that I want the navigation items to be displayed in a single row. Here is the fixed-top navbar: Below is the navigation menu code: https://i.sstatic.net/Zqrvm.png ...

Incorporating Ajax comments into an Ajax-powered status feature

I'm currently in the final phase of implementing ajax in my feed. Originally, I thought it would be a simple matter of pasting the comment input, but it turned out to be more complex than I anticipated. I placed the input below the main ajaxed status ...

Tips for obtaining the title of a WordPress post

While there may be a question with a similar title, my inquiry is distinct. How can I retrieve the title of a WordPress post without it being printed? I am aware that the_title() both returns and prints the post title, but I would prefer to store it in a ...

Utilizing Google Maps API v3 to validate HTML form inputs within an info-window, with seamless resizing capabilities

My Google Maps info window contains an HTML form with the jQuery validation plugin, but I am facing issues with error messages overflowing the info window when displayed below the form input field. I have searched for solutions to similar problems, but no ...

Tips for adjusting the width of ngx bootstrap modal?

Is there a way to adjust the width of my ngx bootstrap modal so that it is not fixed? I have attempted to modify it in the HTML code below but without success: Here's the HTML snippet: <div bsModal #childModal="bs-modal" class=" ...

The appearance of the page varies when viewed on different computers using the same version of Firefox

Previously, I posed a question with a touch of irony regarding Firefox without providing an example. As a result, my question was downvoted and I had to request its removal. Now, I have an example illustrating the issue at hand. It took some time to clean ...

Converting hierarchical JSON data into a table with rowspan using Angular

I am facing a challenge in creating a table using nested JSON obtained from an API. I am unsure how to dynamically merge cells when needed, especially since the JSON structure can be nested up to 6 or 7 levels. Desired Table : Expected Table Current Ou ...

CSS: Continuous Automated Slide Transitions

What CSS code do I need to incorporate into my code to create a continuous Slider Animation? I want the pictures to slide automatically one by one, with a specified time interval between each slide when not on hover. The hover function is already included ...

Each div will display the same image twice when loading the image

I have a grid where images are dynamically loaded with a link to a lightbox. Currently, this is how I am achieving it: $(".selection_thumb").each( function(i) { $(this).append("<a data-lightbox='image-1' href='img/folder/folder/"+(++ ...

Issue with Ajax request failing to successfully send and retrieve raw HTML data

Utilizing an Ajax call to trigger a C# method that is responsible for processing user paste input by eliminating unwanted html tags and attributes. Encountering an issue where my Ajax call fails when I paste in content with html formatting (containing tag ...

What steps can be taken to enlarge the select button within a <select> field?

Is there a way to enlarge the size of the downward-pointing arrow button within a <select> element? Here is an example of what my code looks like: <select> <option>Select City</option> <option>City1</option> <o ...

Do XAML-based apps on Windows 8 provide a noticeable speed advantage over those built with HTML and CSS?

We are in the process of developing a photo-heavy Windows 8 Metro-style app and are concerned about UI performance. While choosing Objective-C over HTML for iOS was an easy decision to achieve the necessary UI performance, we are unsure about the speed com ...

The span exits the external div only once the animation has concluded

I utilized jQuery to create an animation effect: http://jsfiddle.net/rxCDU/ UPDATE: Please note that this effect is optimized for Chrome browsers! The animation works correctly, however, the green SPAN element moves out of the red DIV only after the ani ...

Conceal a WooCommerce product from a designated category archive once a certain time frame has elapsed

I recently added a "New Arrival" product category section on my WooCommerce website. I am looking for a way to automatically hide or remove products from the "New Arrival" category after they have been published for 15 days, while still keeping them visibl ...

Adjust the border color of a TextField in react/material ui based on whether props are required

If a value is required, the TextField border color will be red. Once a value is entered, the red border will disappear. Check out the images by clicking on the links below: Entered Value Without Value with Required field ...

Modifying HTML Email to Achieve Consistent Rendering Across Various Email Platforms

While creating an HTML based email for our subscribers, I noticed that it renders differently in various email clients. The main issue arises in Outlook 2003 where the main picture is offset to the left and the grid boxes vary in height depending on the co ...

Hiding the button until either hovering over the div or entering text into the input field

I'm looking to create the following structure: <div class-name="search"> <input class-name="input"/> <button class-name="searchbutton> search </button> </div> However, I would like the button to initially be hidden. ...

What is the reason behind the immediate firing of the animate callback function when a CSS transition is present?

I am facing an issue where the callback function fires immediately, disregarding the linear ease type and defaulting to the swing ease in CSS transitions. Is there a way to ensure that the animate function works correctly with the transition? The reason fo ...

Altering the input field's content in response to a button click through JavaScript's addEventListener function

I am struggling to get the input text from a form field to change when a button is clicked using JavaScript. I can't seem to figure out why it isn't working correctly. Any assistance would be greatly appreciated. <!doctype html> & ...