html - 为 Outlook 设计电子邮件签名

标签 html css outlook

我创建了这个需要在 Outlook 中使用的电子邮件签名模板。它在浏览器中看起来不错,但 Outlook 完全搞砸了。我不确定我错过了什么

这正是我正在使用的文件:

<!DOCTYPE html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <style>
.sContainer {
    border: solid 1px black;
    widows: 200px;
    width: 350px;
    font-family: Verdana,Arial,sans-serif;
    font-size: 8pt;
    color: #000;
    background-color: #FFF;
    margin: 0px;
    padding: 0px;
    padding-left: 10px;
    display: block;
    overflow: auto;
}

.sHeader {
    padding: 0;
    margin-right: 15px;
    margin-bottom: 5px;
    border-bottom: solid #FFC300 2px;
}
.sHeader .name {
    font-size: 14pt;
}
.linebreak{
    color: yellow;
}
.sBody{
    width:100%;
}
.sLogo{
    width: 160px;
    height: 160px;
    float: left;
}
.sContent{
    padding-left: 15px;
    float: left;
}
.name,.position{
    margin: 0;
    padding: 5px 0;
}

.sContent a {
    text-decoration: none !important;
    color: #000 !important;
}

.sContent p {
    padding: 0;
    margin: 0;
    margin-bottom: 15px;
}
.highlight{
    color:#FFC300;
}

.sLogo img{
  max-width:100%;
  height:auto;
}

        </style>
    </head>
    <body>
        <div class="sContainer">
            <div class="sHeader">
                <p class="name">FULL NAME</p>
                <p class="position">POSITION | POSITION (FR)</p>
            </div>
            <div class="sBody">
                <div class="sLogo">
                    <img src="http://bgdistribution.ca/wp-content/themes/bgdistribution/images/logo.png" alt="logo"/>
                </div>
                <div class="sContent">  
                    <a class="sEmail" href="mailto:EMAILADDRESS"><p>EMAIL ADDRESS</p></a>
                    <p class="sCell">C:(514) XXX-XXXX</p>
                    <p class="sTelephone">T:(514) XXX-XXXX</p>  
                    <a href="www.bgdistribution.ca" class="sUrl"><p>www.<span class="highlight">bgdistribution</span>.ca</p></a>
                </div>
            </div>
        </div>
    </body>
</html>

JSFiddle:http://jsfiddle.net/Luz4u/

最佳答案

Outlook 不支持样式表。所有样式都必须声明为内联,即使这样样式也是有限的。

参见:http://www.campaignmonitor.com/css/

关于html - 为 Outlook 设计电子邮件签名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22412807/

相关文章:

c# - 读取 Outlook .msg 文件

asp.net - 在 ASP.NET 中使用 MAPI 读取 oulook 时出错

vba - 在 Outlook 2016 中添加上下文菜单项

html - 使用包装内容修复距内容顶部 250px 的框

css - 如何为 png 图像制作动画

javascript - 如何用 Javascript 隐藏表格?

html - 没有表单的按钮在 Firefox 中看起来很糟糕

javascript - 我如何处理 ajax 和关闭页面

javascript - 单击编辑按钮时,stackoverflow 如何格式化文本区域?

javascript - 继续在 javascript 中播放动画