Create HTML elements for EDM overlays without resorting to the use of the <div> tag

Currently working on an HTML email with images that need to be overlaid. Utilized a method found at http://jsfiddle.net/sqJtr/, and everything looks great in a web browser. However, when attempting to send it via email, the div tags are ignored and chaos ensues with the images.

<table class="newsletter" border="0" cellpadding="0" cellspacing="0">
    <!--MASTHEAD ROW-->
    <tr>
        <td>
            <div id="container">
                <!-- LOGO -->
                <div id="overlay_logo">
                    <img src="" width="140"/>
                </div>

                <!-- MESSAGE FROM THE DEAN -->
                <div id="main_image">
                    <img src="" width="475"/>
                </div>

                <!-- SIDE GRAPHIC -->
                <div id="overlay_sidegraphic"></div>

                <!-- HEADLINE -->
                <div id="overlay_headline">
                    <!--DATE-->
                    <div class="date">31st August 2015</div>
                    <!--TITLE-->
                    <div class="title">Congratulations</div>
                </div>

                <!-- MESSAGE CONTENT -->
                <div id="overlay_content">
                    <div class="message">
                        <!-- INTRO -->
                        <b>Dear Staff,</b>
                        <br />
                        <!-- CONTENT -->
                        <br />
                        Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis aliquam a orci eget pretium. Donec congue sit amet erat et pharetra. 
                        Aliquam erat volutpat. Sed a feugiat quam. Nulla lorem enim, rhoncus quis venenatis ac, pellentesque ut magna. In vitae lectus tempor, 
                        pharetra felis sit amet, fringilla sem. Nunc interdum erat nec tortor efficitur, 
                        eget aliquam lectus malesuada. Nulla neque enim, viverra quis interdum quis, faucibus ac mauris. Fusce lacinia lorem in mollis semper. 
                        <br />
                        <br />
                    </div>
                </div>
            </div>
        </td>
    </tr>
</table>

To avoid the layout issues in emails, I know tables should replace div tags but unsure how to implement this change while overlaying multiple images. Research led me to solutions using <div> tags which unfortunately didn't work for my case. Seeking guidance on alternative methods. Thank you!

Answer №1

To solve the issue, I turned to an HTML table generator found at for creating tables. By adding additional columns and rows to act as padding, I was able to replace divs that were not functioning properly in Outlook.

Although using a table with extra columns/rows for padding can be a bit confusing, it proved to be effective for me in this situation.

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

Practical steps for programmatically adding or removing md-disable-backdrop in md-sidenav

Can the md-disable-backdrop attribute be removed from HTML? The issue arises when opening the side navigation as the md-sidenav does not have the md-disable-backdrop attribute. After making a selection from the form displayed in the side navigation, I now ...

Is it possible to combine numerous -webkit-transition animations in my css code without using keyframes?

I'm experimenting with chaining multiple -webkit-transition animations in my CSS without using keyframes. I understand it's possible to achieve this by calling a keyframe animation, but I prefer to simply overwrite the properties. However, for s ...

Modify the background color of the text area to white when it is selected using CSS3

In my css code snippet, I have defined the styling for a registration form which includes various rules for different elements like input fields, labels, and text areas. .register { width: 400px; margin: 10px auto; padding: 10px; border: 1 ...

Retrieving various data from the created panel

I've come across an issue with my logic that involves looping and adding a new Panel control to another control: for (int segmentIndex = 0; segmentIndex < segments.Length; ++segmentIndex) { holder.Controls.Add(new Panel() { Width = Unit.Percen ...

Make the buttons stretch across the width of the window

When the App is launched, it will display two buttons in the footer by default. If users interact with the app in a certain way, a third button may need to be added. However, based on other user selections within the app, this button may also need to be ...

Encountering an issue while trying to execute the pagination page demo in PHP?

<?php include("include/db.inc.php"); $sql = mysql_query("SELECT * FROM emp"); $nr = mysql_num_rows($sql); if(isset($_GET['page'])){ $pn = preg_replace('#[^0-9]#i','',$_GET['page']); ...

Incorporate live data into a sample chart.js file within a Django template

I'm currently using the "start bootstrap4" template in my Django project. I need to customize the data displayed in a chart contained within the template by modifying the chart-pie-demo.js file. In my views.py file, I have defined the data that I wan ...

What is the best way to change the <tr id> to <div id>?

Hey there, I'm working on an asp.net page with the following code: <tr id="XYZ" runat = "server"> <td>body</td> </tr> I wanted to change this into a div and span format like so: <div class="ui-class" id="XYZ"> <sp ...

Is there a way to determine the number of Waypoints that are currently toggled simultaneously?

I have a collection of elements arranged in rows and I am applying Waypoints instances to them. <div class="row"> <div class="col-xs-6 col-sm-4"><div class="foo"></div></div> <div class="col-xs-6 col-sm-4"><div c ...

What is the reason for not dynamically passing all values in HTML with Vue JS?

Working with Vue.js and Laravel is my current setup. I am able to successfully pass a few variables through the Vue.js component template, but some of them are not being passed and show up as empty strings (""). HTML (Template): <template v-if="sho ...

Javascript Calculator with Dual Input Fields

I have been given a task to create a calculator by tomorrow using Javascript. Unfortunately, I am currently taking a distance course and Javascript has just been introduced in this assignment. While I am familiar with HTML and CSS, Javascript is something ...

Can the CSS of an iframe be modified if the iframe is located on a different domain?

Is it feasible to modify the CSS of an iframe if the iframe is not located on the same domain? If so, what are some ways to apply and alter CSS for this situation? Any assistance would be greatly appreciated. <iframe id="frame1" width="100%" height="35 ...

Tips for maintaining the current page after refreshing in AngularJS

Hello, I am new to angularjs and recently created a login page for my project. However, I encountered an issue where, after logging in successfully, the page redirects me to the home page. But when I click on the refresh button, instead of staying on the ...

Is it possible to disable other options when a checkbox is checked, but enable them all when unchecked using

I am trying to create a group of checkbox buttons where if one is checked, the others should be disabled. When the checked checkbox is unchecked, all checkboxes should be enabled. However, my current code is experiencing issues where all checkboxes become ...

Ensure the footer remains at the bottom of the page even with changing

I am encountering an issue with positioning a footer under dynamic content displayed in a div named txtresults. The div is updated with HTML following a query made with an input value, as shown in this example on JsFiddle: JsFiddle Currently, I am struggl ...

Clear all text areas upon initialization

I am currently working on an XSL transformation that generates various HTML <textarea> elements on the web page. One issue I have encountered is that when output as XML, it self-closes automatically. <xsl:output method="xml" indent="yes" omit-xml ...

Place the image at the center of the div element

I'm having a hard time aligning this image in the center of my divs. No matter what I do, the image ends up either slightly off-center or stuck to the edges of the page. I've experimented with placing it within a row using Bootstrap's grid ...

"Addressing the issue of menu overflow with div positioning

I need help with positioning a div that houses my google calendar without overlapping my menu. Any suggestions on how to move the div further down on the page? ...

Discovering the screen width and increasing its value using CSS

Is there a way to determine the screen size and then add 253px to it? For example, in CSS: .element { width: calc(100% + 253px); } What would be the best approach to achieve this? ...

Issues with Loading Bootstrap JavaScript on Basic "Hello World" Project

I am experiencing an issue where the JavaScript code is not displaying on my website. I have checked the inspect element sources and it seems to load correctly, but for some reason, it is not being applied. Any insights on why this might be happening? Than ...