[英]CSS margin & padding not working
When I convert html to PDF margin & padding are not applied in PDF. 当我将html转换为PDF时,空白和填充不应用于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>
Also, how to reduce height of hr
element? 另外,如何减少
hr
元素的高度?
.styleHr{ border-top: 0px solid #8c8b8b; }
<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 class="styleHr"> </td> </tr>
Use a class to hr and apply styles for that class. 使用一个类来hr并为该类应用样式。
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>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.