I'm creating an email signature which has image icons to be displayed. The problem is some people can see the images and but for others, the images are not loaded and show blank box. Here is the code:
<a style="color: white;"
href="https://www.youtube.com/landor" style="text-
decoration:none"><img style="color: green; font-size: 6px;
font-family: Georgia, serif; width: 34px;"
src="https://dnohehtvi22a2.cloudfront.net/YoutubeIcon.png"
alt="YouTube" /> </a></span></p>
I read that some email clients block HTML emails images. Do you think this is the only reason? Does anyone know a better way of creating this?
Thank you,
Make sure you get the basics right, i.e., specify a hex value, and use the width and height attribute:
<img style="color: #00ff00; font-size: 6px; font-family: Georgia, serif; width: 34px;height:24px;" width="34" height="24" src="https://dnohehtvi22a2.cloudfront.net/YoutubeIcon.png" alt="YouTube" />
You can't do anything about Outlook and other email clients that block images by default. There are techniques that try and embed the image, but they still don't get around this image blocking (where the user simply has to click to start the download of images).
Related
So I have made a email signature and it works fine in desktop Gmail. The problem is that when I open an email in desktop Outlook links turn blue and underline . How can I fix this?
This is my HTML
<td style="font-family:'Open Sans', sans-serif;color:#000000;font-size:9px;line-height: 14px;font-weight: 400;">
<a style="color:#000000!important;text-decoration:none!important;" href="" target="_blank" data-saferedirecturl="">
Av.Infante Santo, 69 a-c | 1350-177 Lisboa - Portugal
</a>
</td>
When Gmail spots an address or phone number in an email, it automatically adds an extra style declaration, which formats any link in the email that has no inline styles attached to it, as blue:
.ii a[href] { color: #15c; }
How to fix?
Option 1:
Wrap the telephone number or address in a <span></span>
Give the
<span> a class. Example: <span class=”contact”></span>
Declare the class in the <style> section of your email.
CSS:
.contact a {color:#000000!important; text-decoration:underline!important;}
HTML:
<span class="contact">675 Massachusetts Ave.<br>Cambridge, MA 02139, USA</span>
Option 2:
Add a default styling for all links created by Gmail, for this to work you will need to add an id of body (in this example) to the body of your email.
CSS:
u + #body a {
color: inherit;
text-decoration: none;
font-size: inherit;
font-family: inherit;
font-weight: inherit;
line-height: inherit;
}
HTML:
<body id="body">
</body>
If you want to read more about Gmail links here is the source of the above example code which explains everything fully.
Option 3: (which I usually use)
Add a zero width non joiner code () and space ( ) to the address or phone number so the numbers don't become a link. This is usually client request to disable link.
HTML:
1350-177 Lisboa
All CSS you need in this example will be the ones you use on your HTML/
Hope this answers your question.
I am writing an emailed newsletter, and need to set an image as the footer, with a few clickable links over it. I have figured it out using both HTML and CSS, but no matter where I searched I could not find a way to do this strictly using HTML. Can anyone help me out?
<!--Footer-->
<tr id="footer">
<td id="footer" style="font-family: 'Titillium Web', sans-serif;;-webkit-text-size-adjust:none;background-image: url" img url"" templates\uuaemail-foot.jpg";padding-left:="" 20px;padding-right:="" 20px;padding-top:="" 10px;padding-bottom:="" 20px;"="">
<table height="101" width="602">
<tbody>
<tr>
<td id="footer" style="font-size: 10px;color:white;" height="95" valign="top" width="600" align="center"><p><br></p><p class="style3"><strong><span style="font-size: 12px;">admissions.rutgers.edu<br></span></strong></p><p class="style3"><span class="style7"><span style="font-size: 8px;"><strong> University Undergraduate Admissions</strong>, Operations Center<br>©2017 , an equal opportunity, affirmative action institution.</span></span></p></td>
</tr>
</tbody>
</table>
</td>
Is what I currently have (with CSS styling)
update: My issue is that the email is widely sent to Ms Outlook 2016, which I have both heard and seen through testing that it does not process CSS styles very well. When I opened this code in Outlook, it showed the CSS styling commands at the top of the message, and did not apply it at all.
CSS is just an organized way for the the stylesheet. Although not recommended, you can use inline styles with just the HTML to achieve almost everything, if you post your code, may be some of us can suggest a definite answer.
HTML is a markup language, it does neither add functonality or style by itself.
There are tags there the browser places default values.
Eg.
<footer> </footer>
The most browser add automaticly:
footer {
display: block;
}
Or the h tag
<h1></h1>
The most browser set the default values like:
h1 {
display: block;
font-size: 2em;
margin-top: 0.67em;
margin-bottom: 0.67em;
margin-left: 0;
margin-right: 0;
font-weight: bold;
}
Every other style change has to be done by your self with css. You can also work with inline stlyes like:
<h1 style="color:red;"> A red big text </h1>
A good way to find more about default values and inline styles is: https://www.w3schools.com/
You want to use background image in your email and you want it rendered in outlook. Use this site http://backgrounds.cm/ to generate code for background image that will work in all outlook desktop versions. Then you can add links etc. over the image.
Also, please don't use same id more than once in your code. You can assign an ID to one element only. To cover multiple elements, use class attribute.
Here is the situation. I want to edit the HTML in my forum but there is no CSS support. I have included what I have, barring I didn't screw it up. What I want to do is put the three elements after the opening text side by side, in line. Next I want to do the same with the last to elements, the hit counters. My working knowledge is limited and I have tinkered to the last of my patience. I am a amateur, self taught, noob, whatever you want to call it so forgive my lack of knowledge.
<p>Click on the Iowa state icon to view members in your area of the state. To be placed on the map with what you are interested in finding click on the "Pop Smoke" icon and post your state, county and interest on the "local Patriots" group page. In order to view the Iowa Constitution click the Constitution icon.</p>
<p><img class="align-center" src="http://i68.tinypic.com/331lr0i.jpg" alt="" width="150"/></p>
<p><strong><strong><img class="align-center" src="http://i63.tinypic.com/e5qw7l.png" alt="" width="125"/></strong></strong></p>
<p><img class="align-center" src="http://i68.tinypic.com/znrh28.jpg" alt="" width="200" border="0"/></p>
<p><img alt="" src="http://api.ning.com:80/files/nkvdZEQNy6zCn2jimzPD4qqESNX8HVjut48i5dAhMIf3v26qIZPzpAG6BqDSJKGk2ZV*G7wvlRG2*j3zCkGfOUKCqKyc83y1/alumbar.gif" width="540"/></p>
<p><a rel="nofollow" href="http://www.reliablecounter.com" target="_blank"><img src="http://www.reliablecounter.com/count.php?page=modernmilitiamovement.com/group/iowa-state-group&digit=style/plain/6/&reloads=1" alt="" title="" border="0"/></a><br/><a rel="nofollow" href="http://www.reliablecounter.com" target="_blank" style="font-family: Geneva, Arial; font-size: 9px; color: #330010; text-decoration: none;">Unique visits</a></p>
<img src="http://www.reliablecounter.com/count.php?page=modernmilitiamovement.com/group/iowa-state-group3&digit=style/plain/6/&reloads=0" alt="" title="" border="0"/></a><br/> <a rel="nofollow" href="http://www.curinglight.com" target="_blank" style="font-family: Geneva, Arial; font-size: 9px; color: #330010; text-decoration: none;">All visits</a></p>
You're using inline style ("style=...") already. Paragraph elements display "block" by default, which means they will each start a new line and span the the entire width available to them.
I'd suggest wrapping each set of tags you want vertically aligned together in a div and either change the display styling of your paragraphs or remove some of them.
I have 4 small images lined up horizontally as shown below
<span style="font-size: 10.0pt; font-family: Verdana, Tahoma, Geneva, sans-serif; color: gray">
<img src="image source">
<img src="image source">
<img src="image source">
<img src="image source"><br /> </span>
when i run the code, browsers diplay these for images with the right space between them, but if i run the code using outlook the test it, the images do not have the spacing between them. I understand this is an outlook problem but is there a way to solve these issue, i have tried adding padding style and margin stil to each image but that does not help. How can i get around this problem to add spaces between these images.
Outlook tends to ignore most of CSS and almost anything you put into a "style" attribute, so your most reliable option here is to insert (non-breaking space) entities between the images.
I was wondering if you could display a link as normal text.
<a id="" href="" target="_parent"><img src="" width="121" height="20" alt="">
<div style="position:absolute;left:163px;top:1px;font-size: 12px; display: block">
<font color="white">Log in</font></a>
I'm trying to overlap an image that is also a button, with the text "Log in", it works as it is with the code above, but I was wondering if I can change the "log in" which displays as blue and underlined to appear as normal text.
In css:
a {
color: inherit;
text-decoration: inherit;
}
These values can also be stuck in your anchor tag's style attribute.
Should result in your anchor tags looking the same as the text color and decoration of the parent(s).
If you have a look at Cascading Style Sheets (CSS) you can change the colour and the text style of the link.
In your example, you could use
<a id="" href="" target="_parent" style="color: white; text-decoration: none;"><img src="" width="121" height="20" alt="">
<div style="position:absolute; sleft:163px;top:1px;font-size: 12px; display: block">
<font color="white">Log in</font>
</div>
</a>
However I would learn how to use external stylesheets and link them to your HTML through the <link> tag in the <head> of your html. You can then style up individual tags through the tag name, an id or a css class. So an updated example would be:
<link rel="stylesheet" href="link-to-your-css-file" />
in your css file have
a.imgLink{
color: white; text-decoration: none;
}
div.imgLink{
position: absolute; left: 163px; top: 1px; font-size: 12px; display: block;
}
Then your html would be
<a class="imgLink" id="" href="" target="_parent">
<img src="" width="121" height="20" alt="">
<div class="imgLink">
Log In
</div>
</a>
Not only does it make your HTML "dry" but it gives you greater control over the styles of your html by only changing the css file.
If you don't want the link to be underlined,
set " text-decoration:none"
use this code in your html file
<style>
a {
text-decoration: none;
color: #000; /* or whatever colour your text is */
}
</style>
Short answer: yes.
Longer answer:
Yes, here is a fiddle, but you probably don't want to hide links from your user.
stslavik makes a good point with "text-decoration: inherit". Here is another fiddle. On my browser the "blam" and "stslavic" both show with strike-through, but I'd go with the "inherit" versus the "none"; just seems better to me.
(P.S not advertising this and no spam. Click on 'Hate AI' to reach my project)
You can do this =>
<h1><a style="text-decoration: none; color: inherit;" href="https://obnoxiousnerd.github.io/hate-ai">Hate AI</a></h1>
<p>A personal assistant that hates you but still helps you.</p>
The logic here was adding a style to the a tag which contains the following:-
text-decoration: none;
color: inherit;
text-decoration for removing the underline under the text.
color: inherit for removing the usual purple color of links.
Sure - just adjust the CSS for 'a' elements on the page.
Just a simple snippit to show some size/coloring possibilities, to make your link fit thematically when the rest of your text a bit better.
Wow, Look at this website! It's called Website! It's a shame that this link looks horrible, though!
<h2><a style="color: #A52A2A;; text-decoration: none;" href="https://www.website.com/">Oh, boy! You can now click here to visit Website's website without the link looking bad!</a></h2>
<h2><a style="color: #A52A2A;; text-decoration: none;" href="https://www.bing.com/">Uh oh, the Website website is broken! Visit the pinnacle of innovation, Bing, instead!</a></h2>