我试图发送一个R标记文件作为身体在电子邮件和有一些格式化问题。
我是CSS的完全初学者,所以我希望这是一个简单的修复,但它让我发疯。
我为该表设置了以下CSS:
<!DOCTYPE html>
table {
font-family: arial, sans-serif;
border-collapse: collapse;
}
table caption {
color: rgb(241, 135, 0);
font-size: 30px;
text-align: center;
}
table tr:nth-child(even) {
background-color: white;
}
table tr:nth-child(odd) {
background-color: rgb(237, 237, 237);
}
table th {
background-color: rgb(198, 198, 198);
color: white;
font-weight: normal;
border: 1px solid #999;
padding: 20px 30px;
text-align: left;
word-break: keep-all;
}
table td {
color: rgb(0, 0, 0);
font-size: 14px;
border: 1px solid #999;
padding: 20px 30px;
text-align: left;
word-break: keep-all;
}如果我然后将带有blastula::render_email的R文件转换为电子邮件( .Rmd文件的输出设置为blastula::blastula_email),这一切看起来都很棒:

然而,在发送电子邮件时,列名和字段的最后一个字母被包装成一个新行:

我怎样才能防止这些信件被包裹起来?
发布于 2022-05-16 15:41:09
也许你是在找:
table th {
white-space: nowrap;
}https://stackoverflow.com/questions/72261802
复制相似问题