CSS question
- Started
- Last post
- 38 Responses
- BabySnakes0
http://htmlemailboilerplate.com/… is a nice start for HTML emails.
It has some css for images:
img {
outline:none;
text-decoration:none;
-ms-interpolation-mode: bicubic;
}
a img {border:none;}
.image_fix {display:block;}Hope it works!
- CygnusZero40
^ Thanks, but not effective in Outlook.
- Dealing with these image problems ALL DAY. Extra space all over the place.CygnusZero4
- well you have to use inline styles...you are using inline styles for outllok right?BabySnakes
- BabySnakes0
Oh and for future html emails, this tool lets you use classes and it will apply all the inline styles for you!
http://beaker.mailchimp.com/inli…
- CygnusZero40
^ Doesnt make any difference. That isnt the problem. Tried both ways.
- I meant inline styles isnt the problem in outlook. Other styles are working fine. Nothing works on images.CygnusZero4
- CygnusZero40
Fuck I figured it out. Just put the damn images in their own tables. That fixed it.
Now I just need to figure out how to get print button code on a custom image.
- CygnusZero40
Unreal. Even just a basic print button will not show up in outlook. Now idea why. Thought this would be easy. Just doesnt show up.
I picked the wrong profression.
- CygnusZero40
Is it actually even possibly to have a print button in an email? I'm using this code and it just wont even show up in Outlook.
<form>
<input type="button" style="font-size: 12px; color: #e9741f; border: #e9741f 1px solid; background-color: #ffffff; padding-top:1px;" value="PRINT"
onclick="window.print();return false;" />
</form>
- IRNlun60
I've never appreciated css more after having built a ton of emails. I used this site as a resource for device support.
- CygnusZero40
So from what that says, I cant have a form button in Outlook 2007 which just so happens to be what I have to make this work for.
But is there any other way to have a print link without it being a form button?
- Nathan_Adams0
Just make a link that takes you to a web version of the email in your browser, and have some javascript that will print on load. Only way you can do it that covers all bases.
- CygnusZero40
Ok I'm down to 1 last issue then this damn thing is done.
In the body of the newsletter I have some standard HTML links that should be a certain color, but when sent through Outlook 2007 it's ignoring the styles and defaulting back to the standard issue web blue link color.
Ive tried styles in the header, inline styles, nothings working, and Ive done quite a bit of searching and online found 1 page with some different solutions, none of which worked.
Anyone have any insight into this or is it just not fixable?
- Here's the link with solutions that werent working for me. http://www.ianhoar.c…CygnusZero4
- uan0
maybe deprecated attributes work: link, vlink, alink attributes in the body tag.
i.e. something like this:
<body bgcolor="#cccccc" text="#000000" link="#ff0000" vlink="#00ff00" alink="#0000ff">
- CygnusZero40
^ Thanks, just tried. Doesnt work in Outlook 2007. Obviously this problem isnt THAT critical, but it sure would be nice to fix.
- uan0
so,...maybe something like this, also deprecated, and not tested, just what I would try next:
<a ...><font color=“#ff0000“>the link text</font></a>
- CygnusZero40
^ Awesome, that worked! The visited color still goes to purple, so anyway to block that? If not, no big deal. You're the man!
- CygnusZero40
^ Gave that a try using the below doctype and vlink but didnt work.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
- CygnusZero40
Also tried this one, but didnt work either. Outlook 2007 uses Word to render HTML so I guess it doesnt recognize the vlink tag.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">- :(. vlink alink should be supported...don't know how to make it work: http://msdn.microsof…uan
- CygnusZero40
Yeah its just not working. Insists on using the purple visited style. Not really a big deal, at least I have the right default color of the links now.
Thanks. Unreal how O2007 uses Word to render HTML. Unfortunately Im forced to make this newsletter work for that.