如何在 Hotmail 的 html 电子邮件中为 TABLE 或 DIV 添加边框?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4100361/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to add border to a TABLE or DIV in html email in Hotmail?
提问by Eeyore
Yes, html emails are bad but I have to send html newsletter
to my a list of clients. Most of them use Hotmail
.
是的,html 电子邮件很糟糕,但我必须html newsletter
向我的客户列表发送。他们中的大多数使用Hotmail
.
Is it possible to add a CSS
border around a <table>
/ <div>
element?
是否可以CSS
在<table>
/<div>
元素周围添加边框?
<div style="border:1px solid #000000;">BORDER</div>
doesn't work
<div style="border:1px solid #000000;">BORDER</div>
不起作用
回答by Ed H
Looks like the best option is creating a table within a table:
看起来最好的选择是在表中创建一个表:
<table bgcolor="#ACD13C" width="100%" cellpadding="2" cellspacing="0"><tr>
<td><table bgcolor="#ffffff" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td style="font-weight: normal; font-size: 0.9em; color: #000000; font-family: Arial,helvetica,sans; padding:0px; text-align:left;" width="400">Text goes here</td>
</tr>
</table></td></tr></table>
Hotmail just doesn't like borders...
Hotmail 就是不喜欢边框...
回答by bevacqua
try to use
尝试使用
border="1"
回答by hkadejo
try to use
尝试使用
<div style="border:1px solid black;">Hola</div>
if it works
如果它有效
回答by neuroxik
One way to avoid specifying for a generic name like "black" or a shortened version of the hex color (like "#000", which does not always work) is to specify each element seperately like so:
避免指定通用名称(如“黑色”或十六进制颜色的缩短版本(如“#000”,它并不总是有效))的一种方法是单独指定每个元素,如下所示:
<table style="border-style:solid; border-width:1px; border-color:#000000;"><tr><td>....</td></tr></table>