1

CF版:7,0,2,142559

<cfdocument pageheight="11" 
            pagewidth="8.5" 
            unit="in" 
            marginbottom=".7" 
            marginleft="0" 
            marginright="0" 
            margintop="1.1" 
            format="pdf" 
            pagetype="custom" 
            scale="100">

我有一个

<cfdocumentitem type="header">
  <style type="text/css" media="screen">@import "header.css";</style>
  <div class=header>
    Content
  </div>
<cfdocumentitem>

header.css 看起来像

#top {
position:absolute;
left:0in;
top:0in;
height:.458in;
width:8.5in;
background-color:#770000;
}

也有类似的页脚

然后在我的cfdocument标签内

<div id="content" 
     style="position:absolute; 
            left:0in; top:0in; 
            width:7in; 
            border:solid; 
            border-width:thin;">

问题是内容 div 呈现的比页眉和页脚更宽,看起来它超出了比例或其他东西。如果我以猜测的方式减小“内容”div的宽度并进行检查,似乎一旦我达到与页眉​​和页脚宽度匹配的宽度,它就会恢复正常比例并且不会适合我需要的宽度。我怎样才能解决这个问题?

烦人的是我可以将内容 div 设置为 width:6.51in;height:6.95in; 它非常适合。

4

1 回答 1

2

这是 CFMX 7 中的一个错误。检查这些链接并确保更新您的服务器。

ColdFusion MX 7 热修复
ColdFusion MX 7 CFDocument热修复

于 2011-04-10T18:13:54.513 回答