【问题标题】:while printing div goes inside text box打印 div 进入文本框时
【发布时间】:2013-02-20 05:02:18
【问题描述】:

对于普通网页,我正在尝试打印 A4 尺寸的页面..... 网页在没有打印的情况下工作正常...... 当我在打印后看到页面时,最后一个 div 进入文本框...... 如何让最后一个 div 留在右边.....

http://jsfiddle.net/D7vgU/embedded/result/

<div style=" width: 300px; display: inline-block; position: relative; bottom: 39px; float: right;">

  <span style="color: #000; font-size: 12px; font-family: arial; font-wieght: bold; margin-left: 45px;">
    Mark Up
  </span>
  <span style="margin-left: 110px;">
    10%
  </span>

  <div>

    <span style="margin-left: 45px;">
      Non-Tax Amount
    </span>
    <span style="margin-left: 59px;">
      0
    </span>

  </div>
</div>

【问题讨论】:

    标签: html css printing css-float


    【解决方案1】:

    你可以使用:

    <link rel="stylesheet" type="text/css" media="print" href="print.css">
    

    @media print {/*printer only styles here*/}
    

    【讨论】:

    • :不,我没有使用它......它有什么用......我在css中使用媒体而不是在html中打印
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多