Outlook.com强制固定宽度150px

时间:2017-09-20 13:15:40

标签: html css email outlook

几个星期以来,我遇到了我发送给所有Microsoft帐户的所有电子邮件格式的问题,即Hotmail.com,Outlook.com等。

我看到Outlook为我的html添加了一个额外的样式,特别是一个自动将所有html元素的宽度设置为150px的类,使得它基本上无法读取和点击。

例如:

<div class="rps_75ff">
<style type="text/css">
<!-- .rps_75ff #x_outlook a
{ padding: 0; }
.rps_75ff .x_ReadMsgBody
{ width: 100%; }
.rps_75ff .x_ExternalClass
{ width: 100%; line-height: 100%; background: #d7d7d7; min-width: 600px!important; }
.rps_75ff .x_forceWidth
{ width: 600px!important; }
.rps_75ff .x_forceWidth .x_tableDX
{ width: 280px!important; }
.rps_75ff .x_ExternalClass .x_forceWidth
{ width: 600px!important; }
.rps_75ff bodyx_[w8f] .x_forceWidth
{ width: 600px!important; }
.rps_75ff .x_ExternalClass, .rps_75ff .x_ExternalClass p, .rps_75ff .x_ExternalClass span, .rps_75ff .x_ExternalClass font, .rps_75ff .x_ExternalClass td, .rps_75ff .x_ExternalClass div
{ line-height: 100%; }
.rps_75ff bodyx_[class=w8f] .x_mainTable
{ width: 600px!important; min-width: 600px!important; max-width: 600px!important; }
.rps_75ff bodyx_[class=w8f] .x_tableDX
{ float: right; }
.rps_75ff bodyx_[class=w8f] .x_tableSX
{ float: left; }
.rps_75ff bodyx_[class=w8f] .x_phoneText
{ text-align: right!important; }
.rps_75ff bodyx_[class=w8f]
{ background-color: #e8e8e8; color: #000000; font-family: Arial,Helvetica,sans-serif; font-size: 14px; width: 100%!important; margin: 0; padding: 0; }
.rps_75ff bodyx_[class=w8f] img
{ border: 0; max-width: 100%; }
.rps_75ff bodyx_[class=w8f] a img
{ border: none; }
.rps_75ff bodyx_[class=w8f] table td
{ border-collapse: collapse; }
.rps_75ff bodyx_[class=w8f] .x_datiContainer
{ display: block!important; float: none!important; height: 100%!important; width: 100%!important; overflow: normal!important; }
.rps_75ff bodyx_[class=w8f] .x_rightImage
{ width: 150px!important; height: 150px!important; border: 5px solid red!important; }
.rps_75ff bodyx_[class=w8f] .x_tablePrezziDx .x_btn
{ float: right; }
.rps_75ff *
{ width: 600px!important; }
.rps_75ff *
{ display: block!important; float: none!important; height: 100%!important; width: 100%!important; overflow: normal!important; }
.rps_75ff *
{ width: 150px!important; height: auto!important; }
.rps_75ff iframe.x_attachment, .rps_75ff iframe.x_attachment-pdf
{ border: 10px solid transparent!important; width: 40%!important; float: left!important; }
.rps_75ff imgx_[class=banner]
{ width: 100%!important; height: auto!important; max-width: 100%; }
.rps_75ff .x_overflowing, .rps_75ff .x_overflowing *
{ border-color: gold!important; color: gold!important; font-size: 8px!important; outline: none!important; display: none!important; }
.rps_75ff .x_inner_image .x_snow
{ content: ''; background: none; font-family: Androgyne; height: 100%; left: 0; top: 0; width: 100%; z-index: 0; }
--></style>
<div>
<div class="...">EMAIL CONTENT</div>
</div>
</div>

_rps 是添加到包含my html的div的外部类。 这发生在我的代码中有媒体查询。但这很奇怪,因为两个月前正确显示了相同的HTML。

我真的不知道如何面对这个问题。 Outlook支持对我没有任何帮助。

这是Outlook.com中的结果

select 
    trandate, shortdescr, ref as BillNo,
    f.companyname, h.brnchname,
    tranno, AccName,
    sum(dramount) as NetAmount, sum(SGST) GstAmt,
    sum(CGST) CstAmt, sum(IGST) IGstAmt, s.SeriesName 
from 
    (select 
         trandate, shortdescr, ref, dramount, CompanyID,
         brnchid, accountid, refaccountid, tranno, seriesid, 
         case 
            when accountid = (select top 1 gcsysdescription 
                              from systemparameters 
                              where gcsysvar = 'SGST') 
               then dramount - cramount 
               else 0 
        end as SGST, 
        case  
           when accountid = (select top 1 gcsysdescription 
                             from systemparameters 
                             where gcsysvar = 'CGST' ) 
              then dramount - cramount 
              else 0  
        end as CGST, 
        case 
           when accountid = (select top 1 gcsysdescription 
                             from systemparameters 
                             where gcsysvar = 'IGST' ) 
              then dramount - cramount 
              else 0  
        end as IGST, 
        case 
           when srno = 1 --=(select top 1 gcsysdescription from systemparameters where gcsysvar='IGST' ) 
              then (select accmas.accountname 
                    from accountdet accdet 
                    left outer join accountmaster accmas on accmas.accountid = accdet.accountid 
                    where accdet.srno = 1 and accdet.seriesid = 19) 
        end as AccName
    from 
        accountdet) as abc 
left outer join 
    companymaster F on abc.CompanyID = F.companyid 
left outer join 
    brnchmst H on abc.brnchid = H.brnchid 
left outer join 
    Accountmaster a on abc.accountid=a.accountid
left outer join 
    SeriesMaster s on abc.SeriesID=s.SeriesID 
where
    abc.companyid = 37
    and abc.brnchid in (7, 9, 8, 3, 4) 
    and abc.seriesid = 19
    and convert(varchar(10), trandate, 112) >= '20170920' 
    and convert(varchar(10), trandate, 112) <= '20180331' 
    and a.EntryType <> 'D' 
    and abc.dramount <> 0
group by 
    trandate, shortdescr, ref, f.companyname, h.brnchname, tranno, s.seriesname, AccName

0 个答案:

没有答案