The logo and text appear to be out of place and not properly

My current project involves creating an email signature that is easily transferable to email programs like Outlook or Gmail. You can access the website for this project here:

After pasting the signature into Gmail, it displays correctly. However, when pasted into Outlook, it appears like this: https://i.sstatic.net/fnTGN.png.

You'll notice that the vertical bar and text are positioned below the logo instead of next to it as intended. It seems that the CSS float property isn't functioning properly.

What steps should I take to resolve this issue?

If you prefer not to inspect the linked webpage directly, you can refer to the following HTML code:

<span id="signature">
        <div style="width:500px">
            <div class="row">
                <div class="column" style="float: left;
                                          width: 14%;
                                          padding: 6px;">
                    <img src="https://www.uog.edu/_resources/images/oit/social_media_icons/signature/BigG-resized-but-blurry.png" alt="Signature Logo" style="height:130px; width:auto; margin:0px; padding-top: 8px;"/>
                </div>
                <div class="column" style="float: left;
                                          width: 14%;
                                          padding: 6px;">
                    <div class="vl" style="border-left: 2px solid;
                                            color: #046A38;
                                            height: 150px; font-family: Calibri, sans-serif;">

                        <h1 id="name-signature" style="font-size:15px; color:#046a38; margin:0px; padding-left: 10px; padding-top: 14px; width: 300px; font-family: Calibri, sans-serif;">Joe Triton</h1>
                        <h2 id="title-signature" style="font-size:15px; color:#046a38; margin:0px; font-style:italic; padding-left: 10px; padding-top: 1px; width: 300px; font-family: Calibri, sans-serif;">Computer Center Assistant</h2>

                        <p style="font-size:15px; color:#464646; margin:0px; padding-left: 10px; padding-top: 1px; width: 300px;">
                            <a id="office-signature" href="tel:5551231234" target="_blank" style="color:#464646; font-family: Calibri, sans-serif;">+1 (671) 555-2640</a><br/>
                            <a id="email-signature" href="mailto:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a1cbd5d3c8d5cecfe1d5d3c8d5cecf8fd4cec68fc4c5d4">[email protected]</a>" target="_blank" style="color:#464646; font-family: Calibri, sans-serif;"><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="2c46585e455843426c585e455843420259434b02494859">[email protected]</a></a><br />
                            <!-- href="https://it.uog.edu/" target="_blank" -->
                            <span id="department-signature" style="color:#464646; font-family: Calibri, sans-serif;">Information Technology</span>
                        </p>
                        <div id="socialMediaIcons" style="width:300px;">
                        </div>
                    </div>
                </div>
            </div>
            <div style="clear:both;"></div> <!--this line of code causes the following to not be floated.  The problem isn't seen in the browser, you see it when you copy it to Gmail -->
            <p style="font-size:12px; color:#464646; margin:0px; padding-top: 10px; font-family: Calibri, sans-serif;"><em>The University of Guam is an equal opportunity provider and employer.</em></p>
            <hr style="border-color: #00652E; 
                       margin: 0 0px 20px; 
                       border: 0;
                       border-top: 1px dotted #B3B2B1;
                       height: 1px;"/>
            <p style="font-size:12px; color:#464646; margin:0px; text-align:justify; font-family: Calibri, sans-serif;">CONFIDENTIALITY STATEMENT:  This message is from the University of Guam and contains information which is privileged and confidential and is solely for the use of the intended recipient. If you are not the intended recipient, any review, disclosure, copying, distribution, or use of the contents of this message is strictly prohibited.  If you have received this transmission in error, please destroy immediately.</p>
            <br/>
            <p style="font-size:12px; color:#464646; margin:0px; text-align:justify; font-family: Calibri, sans-serif;">This email message (including any attachments) is for the sole use of the intended recipient(s) and may contain confidential information covered under the Family Educational Rights &amp; Privacy Act (FERPA). If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message (including any attachments) is strictly prohibited. If you have received this message in error, please destroy all copies of the original message (including attachments) and notify me immediately by email or phone. Thank you.</p>
        </div>
    </span>

Answer №1

When it comes to HTML emails, the rules are different. Certain CSS styles that work on modern websites may not be applied in HTML emails.

To learn more, click here.

Answer №2

HTML:

 <div class="container">
    <div class="box">
        <img src="https://www.mywebsite.com/logo.png" />
    </div>
    <div class="box sidebar">
        <p>John Doe</p>
        <p>Web Developer</p>
        <p>+1 (123) 456-7890</p>
        <p><a href="/contact">[email protected]</a></p>
        <p>Web Development Dept.</p>
    </div>
</div>

CSS:

.container {
    width: 500px;
}

.box {
    display: inline-block;
    width: 48%;
}

.box img {
    width: 60%;
    margin: 0% 10% 0% 20%;
}

.sidebar {
    vertical-align: top;
    padding-left: 2%;
    border-left: 2px solid #046A38;
}

JSFiddle Demo

Flexbox could also be used for a better layout.

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

Fetch replicated popup (bootstrap)

Is it possible to load a newly cloned modal with bootstrap? I am looking to dynamically load multiple modals, but currently facing an issue while attempting to load just one new modal. While there are solutions available for loading cloned elements withi ...

Error encountered in Chrome while trying to fetch Next.js PWA with the use of next-pwa: Unhandled TypeError

Hello, I was recently working on a Next.js project and attempted to convert it into a PWA using next-pwa. To start off, I created the next.config.js file. const withPWA = require('next- pwa'); module.exports = withPWA({ pwa: { dest: ...

unique array that shuffles every time it is reloaded, utilizing only javascript

I have created a string array that holds 6 different classes. Whenever I click a button, a new class is generated randomly. However, the issue arises when I click the button again and get the same class instead of a new random one. Even after reloading the ...

Importing data from an external file into an array using AngularJS

Hey there, I'm new here on Stack and hoping someone can lend a hand because I've hit a roadblock! I'm working with an AngularJS script that generates multiple icons using data from a simple array. Each icon is linked to a YouTube video. Th ...

What is the best way to retrieve a value from one array based on its index in React Native?

Looking to populate the centreValues array with values from another array const centreValues=[ { title:'Type', value:centreDetail.location_type }, { title:'Address', value:centreDetail.address1+centreDetail.ad ...

pdfMake introduces a page breaking effect when the canvas is utilized with the type "line"

Can anyone shed some light on why a canvas declaration with the type "line" is causing a page break in the generated PDF? I've tried removing all canvases and the page break disappears, but I can't identify the root cause. Any insights would be ...

What is the best way to verify the authenticity of a entered captcha code in php?

I'm struggling with validating a captcha code in my registration form. I need to check if the entered captcha code is correct before allowing the user to complete the registration process. If the code is invalid, I want to display an error message. I ...

Is the practice of using data:text/css considered legitimate?

Looking to insert 3 CSS rules into the head tag by using <link /> tags. $('head').append('<link rel="stylesheet" href="data:text/css, .rule0 {} .rule1 {} .rule2 {}" />'); Would this syntax be considered valid? I am aware ...

creating the option for sortable columns in HTML tables

I am working with an html table that is being populated from a text file, formatted and semi colon separated. My goal is to provide the user with the ability to sort alphabetically by clicking on the column header. Is there a way to achieve this using php ...

Invoke the componentDidMount() method in a React Component that is not a subclass of React.Component

I have a react component that I render later in my index.js file index.js import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; ReactDOM.render( <React.StrictMode> <App /> ...

Is the custom attribute event being triggered too soon?

My Unique Component Creation Journey I have meticulously crafted a custom component to enhance the navigation of my application. The core structure consists of an ul element, with each li item dynamically generated based on the contents of the router&apo ...

generate JSON containing a nested array of data and headings using NodeJS express

My Node.js API is currently returning JSON in the following format: [ { "id" : "1", "tstamp": "2017-06-01T00:00:00.000Z", "dmemberprofiles","48400" "dgroupprofiles","4800" "msclprofiles","400" }, { ...

Finding web page links from competition rankings using pattern matching

Challenge I am currently delving into the realm of natural language processing projects. Before diving in, I intend to explore existing works on datasets, particularly those organized on a leaderboard (refer to the "Three-way Classification" section). Ho ...

Using Django to showcase identical forms multiple times within a single view

I am looking for a way to open the same form multiple times while looping through some items. Below is the structure of the form: class CancelRefundForm(forms.forms.Form): cancel = forms.BooleanField(label='Check to cancel the refund', required= ...

Is there a way to update a single element within an array without triggering a refresh of the entire array?

Is there a way to prevent the component from rerendering every time new data is input? I attempted to memoize each cell but I am still facing the same issue. Any suggestions on how to accomplish this? import React, { useState, memo } from "react&quo ...

Framework designed to be compatible with Internet Explorer 7 for seamless

Is there a CSS framework that provides full support for IE7 without any issues? Specifically, something similar to Twitter Bootstrap but with guaranteed rounded corners and properly functioning tabs. I have experienced problems with the Popover plugin sp ...

Ensure that each item rendered in a VUE.js v-for loop is distinct and not repetitive

I have obtained a JSON formatted object from a Web API that contains information about NIH funding grants. Each grant provides a history of awards for a specific researcher. My goal is to display only the latest award_notice_date for each unique project ...

Which one is better: JSON in PHP or JSON in Javascript?

In my current project, I am working on a website that utilizes a PHP function to retrieve JSON data and present it on the webpage. However, I have noticed that when the page loads, it freezes until the response is successfully fetched, creating a visual di ...

Unable to get OverlayView() from Google Maps API to function within an AngularJS directive

My directive "map" is encountering a namespace issue. The mapInit() function is working perfectly, but there seems to be an error with my OverlayView() object that I can't seem to resolve. This is the initial step outlined in the Google documentation ...

Having trouble parsing a JSON string in your JavaScript code?

As a java developer transitioning to JavaScript, I'm faced with the task of parsing a JSON string retrieved from a WebService. Here is the JSON String: { "myArrayList": [ { "myHashMap": { "firstName": "Clara", ...