CSS边际&填充不起作用

时间:2017-06-23 05:56:27

标签: css pdf

当我将html转换为PDF margin&填充不适用于PDF。



<tr>
    <td>
        <img src="2.jpg" alt="" title="" style="width:40px; height:40px;margin-top: -23px; margin-left: -6px;">
    </td>
    <td width="85%" valign="bottom">
        <font size="4" face="Arial"><b>Happy to help</b></font>
        <hr>
    </td>
</tr>
&#13;
&#13;
&#13;

另外,如何减少hr元素的高度?

hr screenshot

pdf with hr screenshot

2 个答案:

答案 0 :(得分:0)

&#13;
&#13;
TargetTypes
&#13;
.styleHr{
border-top: 0px solid #8c8b8b;

}
&#13;
&#13;
&#13;

使用hr类并为该类应用样式。

答案 1 :(得分:0)

Please try this and let me know

<tr>
        <td style="display: block;">
            <img src="2.jpg" alt="" title="" style="display: block; width:40px; height:40px; margin-top: 23px; margin-left: 6px;">
        </td>
        <td width="85%" valign="bottom">
            <font size="4" face="Arial"><b>Happy to help</b></font>
            <hr>
        </td>
    </tr>