Here are two unique CSS-only shapes designed for email signatures

Instead of spending more time struggling to find a solution, I'm seeking feedback on using CSS-only shapes for email signatures. Do they render well and are they compatible with most email clients?

I created an email signature with an SVG logo and social media icons, only to discover that Outlook and other clients do not display them.

You can view the example here:

The reason I prefer CSS over PNG is to ensure the signature displays seamlessly without requiring users to accept or download attachments.

Considering our logo is simple, I thought utilizing CSS-only code might work effectively?

I attempted using this tool but encountered difficulties:

Should I persevere or is it unlikely to display correctly? If there's potential, do you have any suggestions on how to combine two shapes with different colors?

Answer №1

To create a layout with a parent and two child divs, you can set the parent's position to relative and the children's positions to absolute. The children can be anchored to the top right corner of the parent by using the settings below:

.parent {
  position: relative;
  width: 200px;
  height: 200px;
  background: blue;
}

.child1 {
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: white;
}

.child2 {
  position: absolute;
  top: 0;
  right: 0;
  width: 90px;
  height: 90px;
  background: red;
}
<div class="parent">
  <div class="child1"></div>
  <div class="child2"></div>
</div>

Another option is to use just two divs, with the second child having a white border on the left and bottom:

.parent {
  position: relative;
  width: 200px;
  height: 200px;
  background: blue;
}

.child {
  position: absolute;
  box-sizing: border-box;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: red;
  border-left: 10px solid #fff;
  border-bottom: 10px solid #fff;
}
<div class="parent">
  <div class="child"></div>
</div>

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

How to access an element inside a div using the eq() method

Within my #img_wrapper, I have multiple pictures each enclosed in a link: <div id="img_wrapper"> <a href="img1.jpg" style="display: none;"> <img src="img1.jpg" /> </a> <a href="img2.jpg" style="display: none;"> &l ...

Steps to modify the background-color of an iFrame using CSS

I am attempting to extract HTML code from an iframe and apply a background-color to the class: class="body" The structure of my HTML source is as follows: <iframe id="sc_ext_XT29EK" class="sc_ext" width="100%" height="1300px" frameborder="0" src="some ...

Selecting CSS Properties with jQuery

I am trying to make an image change color to blue and also change the background color to blue when it is clicked inside a div. However, my code doesn't seem to be working as expected. Is there a more efficient way to apply CSS to elements? FIDDLE v ...

Is it feasible to utilize Socket.io and Express in conjunction with templates without the need for routes?

Apologies for what might be considered a beginner question, but I'm curious if it's possible to run a Socket.io event server in one folder and have an HTML page utilize that server from a different folder. The reason for this question is because ...

Combine the content from multiple text areas and submit it to another text area

****UPDATE**** Thanks to @JasonB, I was able to resolve the previous issue mentioned. Now, I have three additional textareas on the same form that should only appear when their respective checkboxes are clicked. How can I integrate this into my current sc ...

Strange HTML antics

On my website, I encountered an issue when trying to register without entering any information into the required fields. The errors were correctly displayed in this screenshot: https://i.sstatic.net/wrxjt.png However, after inserting random characters in ...

"The issue with the addClass function not properly executing within an if

I am trying to make a feature where the class changes based on my selection. The issue I am facing is that when I change it for the first time, it switches from being classified as "black" to "colored". However, upon changing it back, it remains labeled as ...

Is there a way to dynamically toggle the visibility of a floating textarea between on and off?

I have my own blog website: Essentially, what I am aiming for is When a user clicks on the search button, a floating semi-transparent textarea window should appear inside the designated rectangle area (as shown in the image, that red orange rectangle). ...

What is the best way to transition a div from the top to the bottom in mobile view?

Currently, I am utilizing Bootstrap 4 framework; however, if it operates effectively on version 3, then it should work seamlessly on v4. Within a single column, I have incorporated 2 div elements as follows: <div class="row"> <div class="col ...

Changing a CSS block in IE7 using jQuery

Users have the ability to update the look of their customizable widget by editing CSS code in a textarea that automatically updates a <style> element when changed. Here is the JavaScript function: function updateWidgetStyling() { $("#stylePrevi ...

Retrieve the ng-option key in AngularJS

As a beginner in Ionic, I am working on adding a drop-down for countries to my registration page. I have successfully populated the drop-down with data from the response, but I'm struggling to retrieve the key value when an item is selected. Below is ...

CSS tabs are not functioning properly as hyperlinks

Having some trouble with this website: The tabs on the site are not functioning when clicked. I've implemented a hover effect using CSS, but I'm unable to get the tabs to work properly. Please advise. Thank you. ...

Finding strikeout text within <s> or <del> tags can be identified by closely examining the HTML codes

The issue arises with the text that reads as follows: 316.6.1 Structures. Structures shall not be constructed This is represented in HTML as: <b> <s> <span style='font-size:10.0pt'>316.6.1 Structures</span> ...

The hamburger icon on the Bootstrap 4 navbar expands as expected, yet it fails to collapse back when

<head> <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> <script src=" ...

Tips for delaying the evaluation of an input field

I have a field for a product where the quantity depends on another product's quantity (must be between 70% and 100%). The issue is, it evaluates so quickly that if the main field is '100', I can't enter '75' in the other field ...

Increasing an ID number automatically using Javascript

I'm currently working on a functionality where a unique number is automatically generated whenever a new record is created. For instance, if I were to click "Create record" on a webpage, the number would auto-fill in the record ID field. Subsequently, ...

Creating Dynamic Videos with PHP and HTML

Trying to display the user-submitted video, but all my attempts failed for some reason: 1. echo "<video width='500px'>"; echo "<source type='video/mp4' src=$var autoplay>"; echo "</video>"; echo "<video width=& ...

Troubleshooting Display Problems when Switching Bootstrap Themes in ASP.NET MVC

I recently made changes to my MVC project by switching the default Bootstrap theme to Bootswatch - Cosmos. However, I am facing an issue with the Navbar as shown in the image below: View Header Display Issue Image Initially, I was using Bootstrap 3.0 and ...

Hover over me to see the CSS animation translate upwards until it reaches a specific point

I am new to CSS animation and I am trying to create a circle that moves from one end to the other on hover. However, I am facing an issue where the circle goes off-screen when the browser size is changed. How can I make it stop at a certain point within th ...

I'm having trouble accessing the Github website. Is there anyone who can lend a hand?

I am facing difficulties accessing the Github webpage through my home Comcast network. It seems that the issue I am experiencing is similar to the one mentioned in this Stack Overflow post about Could Not Resolve Host github.com. However, since the DNS se ...