Alternative Email for Outlook and Gmail

Hey amazing and intelligent buddies!

I've been working on implementing a fallback system for email clients, but despite consulting resources like this HTML Emails: fallback for mso conditional? and other insightful blogs, I still seem to be facing some issues. While the emails display correctly in Outlook, Gmail is still rendering VML which leads to two images being displayed.

 <table border="0" cellpadding="0" cellspacing="0" width="100%" >
    <tr>
        <td></td>
        <td rowspan=2 class="desktop">

                <!--[if mso]>
                    <v:rect style="width:600px;height:281px;" strokecolor="none">
                        <v:fill type="tile" color="#363636" src="http://www.frugi.org/emailpi/assets/header.jpg" /></v:fill>
                    </v:rect>
                    <v:shape id="someName" style="position:absolute;width:600px;height:281px;">
                        <p style="font-family:Georgia; font-size:13px;"><h2 style="color:Red;">Text Over Image Hack!!!</h2></p>
                    </v:shape>
                    <div style="width:0px; height:0px; overflow:hidden; display:none; visibility:hidden; mso-hide:all;">
                <![endif]-->
                    <img src="_PT_icon_personalize_05.png"  style="width:0; overflow:hidden; display:none; float:left" >
                <!--[if mso]>
                    </div>
                <![endif]-->
        </td>
    </tr>
    <tr>
        <!--[if mso]>
                <div style="width:0px; height:0px; overflow:hidden; display:none; visibility:hidden; mso-hide:all;">
        <![endif]-->
        <td colspan=2 ><h2 style="color:Red;max-width:480px; width:0; overflow:hidden; display:none;">Text Over Image Hack!!!</h2></td>
        <!--[if mso]>
            </div>
        <![endif]-->
    </tr>
</table>

Can anyone point out what I might be overlooking here?

For Outlook:

For Gmail:

Answer №1

Appreciate it, John!

<!-- BANNER -->
<table cellpadding="0" cellspacing="0" border="0" height="281" width="100%">
    <tr>
        <td background="http://www.frugi.org/emailpi/assets/header.jpg" bgcolor="#7bceeb" valign="top">
        <!--[if gte mso 9]>
        <v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="width:598;height:281px;">
        <v:fill type="tile" src="http://www.frugi.org/emailpi/assets/header.jpg" color="#7bceeb" />
        <v:textbox inset="0,0,0,0">
        <![endif]-->
                            <div>

                            </div>
        <!--[if gte mso 9]>
        </v:textbox>
        </v:rect>
        <![endif]-->
    </td>
</tr>


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 utilize the onClick event while preserving the use of "this" within the function it triggers?

There is a project with specific needs that require implementation. The task involves adding points to the total score when a button is clicked, without making any changes to the provided HTML code. This requires writing unobtrusive JavaScript code by atta ...

Arranging elements next to each other in HTML

I'm currently in the process of building my first website as a developer and I could really use some assistance. I'm trying to align two items next to each other horizontally, but since I don't have experience with coding HTML, I'm feel ...

What is the process of turning an SVG element into a clickable link?

Is there a way to transform each element within an SVG image embedded in an HTML file into an active link? I want to create an SVG image with clickable elements. Here is a snippet of the SVG image: <svg version="1.1" id="Layer_1" xmlns="http://www.w3 ...

What is preventing this jQuery from altering the opacity?

Currently, I have a piece of code that is intended to change the opacity of a div element from 0 to 1 as soon as the user initiates scrolling on the body. However, it appears to be malfunctioning for reasons unknown. $("bod").load(function(){ document ...

How to place a div within another div without using absolute positioning

I've been searching for a solution to this issue, but nothing seems to be working. I want the inner div to be positioned at the bottom of the outer div, with a 5px margin separating them. However, using absolute positioning disrupts the width and cent ...

Innovative approach to managing extensive geospatial datasets

I developed a unique application that incorporates points onto a map within specific polygons. This app is built using Windows Forms with a straightforward user interface. The points are pre-filtered and the program utilizes Python, geopandas, and folium l ...

The fixed div is overshadowed by the relative divs with a higher z-index

Hey there, check out my HTML snippet below: <body> <div class="relative1"> <div class="fixed1"> </div> </div> <div class="relative2"> </div> </body> Here's the corresponding CSS: ...

Avoid cascading of the 'display' property in JavaScript styling to prevent inheritance

Is there a way in Javascript to toggle the visibility of a larger portion of HTML without affecting inner display properties with display: <value>? Despite setting an outer display property using Javascript, the inner display properties are also alt ...

Navigating through nested arrays in Laravel Blade templates

I have an array that is displaying the code below after being dumped. array:1[ "123"=>array:3[ "test1" => 12345 "test2" => "test" "test3" => 123 ] ] When trying to display each element in an HTML table, the val ...

Issue with the functionality of Jquery scrolling through thumbnail images animation

I have encountered an issue related to the previous question that I posted here. After successfully implementing the provided solution, it initially seemed to be working. However, when I clicked the next button and reached the 3rd click, the jQuery scrolli ...

JQuery Mobile's Panel widget is the culprit behind the demise of the

I'm having some trouble adding a panel to my jQuery mobile page. Every time I try to input the code, all I see is a white screen with the loading widget, and nothing else happens. I have JQuery 2.0.0 hosted by Google, JQuery Mobile JS 1.3.1 hosted by ...

Tips for automatically closing a dropdown menu when it loses focus

I'm having some trouble with my Tailwind CSS and jQuery setup. After trying a few different things, I can't seem to get it working quite right. In the code below, you'll see that I have placed a focusout event on the outer div containing th ...

Utilize jQuery to animate the concealment of elements in my sidebar

On my webpage, there is a sidebar that behaves in a specific way when the browser is resized. Items are only displayed if they are able to fit within the visible portion of the window. This functionality can be seen in action on the jsFiddle provided. htt ...

CSS animation is activated solely upon its initial creation

Exploring the world of Vuejs for the first time with my debut project. The core of my project lies in the main component where I have an array as a data variable. Here's an example snippet: export default { name: 'example-component', ...

Send multiple form submissions using JQuery Ajax without needing to refresh the page

I am facing an issue with my form submission using Ajax. After receiving a response in the form of another form, when I try to submit it again using the submit button, it doesn't go through Ajax and uses the normal method instead. Why is this happenin ...

jquery selector targeting a select optiongroup that contains a specific label value

In my code, I have a select multiple with option groups: <select _ngcontent-oeq-14="" class="form-control" id="category-select" multiple=""> <optgroup label="grocery products"> <option>meat</option> <option>dai ...

Circular gradient backdrop

Looking to create a sleek and professional body background for my website that is as attractive as Twitter's. Can you help me achieve the same blue shaded background effect? I'm new to web development and would appreciate any guidance on how to m ...

Substitute a piece of text within an element while also preserving the formatting of a new line

My goal is to modify the text within the div tag "a/b" to "b/c" while preserving the line break that I have inserted in the HTML using the break tag. Currently, the text is being replaced, but I need the second line to appear below the first line. $(".t ...

Variation in element widths and CSS widths

While inspecting an element in FF, it displays a width of 225px. However, the applied CSS sets the width to 207px for this element. The discrepancy may be due to Bootstrap and varying resolutions. Is there a tool available to identify chang ...

Incorporating a feature that displays one show at a time and includes a sliding animation into an

Hey there! I have this show/hide script on my website that's been working well. However, there are a couple of things I need help with. I want to modify the script so that only one div can be shown at a time. When a div appears, I'd love for it ...