cfdocument 内部 html 渲染比例错误
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;它非常适合。
CF Version: 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">
I have a
<cfdocumentitem type="header">
<style type="text/css" media="screen">@import "header.css";</style>
<div class=header>
Content
</div>
<cfdocumentitem>
header.css looks like
#top {
position:absolute;
left:0in;
top:0in;
height:.458in;
width:8.5in;
background-color:#770000;
}
also have a similar footer
Then inside the cfdocument tag I have
<div id="content"
style="position:absolute;
left:0in; top:0in;
width:7in;
border:solid;
border-width:thin;">
The problem is the content div is rendering wider than the header and footer, it looks like it's out of scale or something. If I reduce the width of the "content" div in a guess and check kind of way, it seems that as soon as I hit a width that would match the width of the header and footer it snaps back into normal scale and won't fit the width like I need it to. How can I fix this?
Annoying thing is I can style the content div to width:6.51in;height:6.95in; and it fits perfectly.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是 CFMX 7 中的一个错误。
检查这些链接并确保更新您的服务器。
Coldfusion MX 7 修补程序
ColdFusion MX 7 CFDocument 修补程序
It's a bug in CFMX 7.
Check these links and make sure you update your server.
Coldfusion MX 7 Hot Fixes
ColdFusion MX 7 CFDocument Hotfix