2014-03-26 51 views
2

我有一个正在创建的cfdocument。我有一个页脚它下面cfdocumentitem页脚未正确显示

<cfdocumentitem type="footer" > 

<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="##FF6F00" > 

<td align="right" style="font-size:10px"> 
<font color="##FFFFFF"> &copy; AT&T Intellectual Property. All rights reserved.<br>AT&T and the AT&T logo are trademarks of AT&T Intellectual Property.</font>  
</td> 
</table> 
    </cfdocumentitem> 

enter image description here

我不是能够得到橙色身体伸展到整个页面,这意味着橙色部分正在显示如上。也没有呈现我指定的字体大小。这是我的风格。关于这里有什么问题的任何想法?

.test{ 
    color:#FFFFFF; 
    font-family:verdana; 
    font-size:4px 
} 

.testone{align-content:stretch} 
+1

'CFDOCUMENT'和扩展名'CFDOCUMENTITEM'只使用CSS的一部分。 https://wikidocs.adobe.com/wiki/display/coldfusionen/cfdocument不幸的是,'align-content'不是其中之一。至于你的字体大小,最后不要忘记';'。 – Chester

回答

0

要设置类的样式,您需要在属性之前放置.

.test{ 
    color:#FFFFFF; 
    font-family:verdana; 
    font-size:4px; 
} 

.testone{align-content:stretch;} 

另外,还要确保cfdocumentitembody是100%的宽度。

+0

是的,我确实有。在课前,刚刚更新它,这是一个错字,仍然没有工作.... cfdocumentitem没有宽度属性。 – user747291

0

请尝试以下变化:

  • 左侧,右侧和顶部的利润在<cfdocument>标记设置为0,底部保证金您的页脚的高度
  • 确保的主要部分您的文档有一个<body>标签
  • <body>标签上添加一个<style>标签并指定主体边距,例如2厘米
  • 现在换你的页脚表在<body>标签
  • 添加<style>标签这个body标签上述内页脚
  • 定身保证金填充,以0
  • 设置表格高度您cfdocument marginBottom

这里是你的代码现在看起来应该(请注意,我指定厘米为我单位):

<cfdocument format="pdf" marginBottom="1" marginLeft="0" marginRight="0" marginTop="0" unit="cm"> 
    <style type="text/css"> 
     body{ margin:2cm; } 
    </style> 
    <body> 
     <p>Page content</p> 
    </body> 
    <cfdocumentitem type="footer"> 
     <style type="text/css"> 
      body{ margin:0; padding:0; } 
      table{ height:1cm; }; 
     </style> 
     <body> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#FF6F00" > 
       <td align="right" style="font-size:10px"> 
        <font color="#FFFFFF"> 
         &copy; AT&T Intellectual Property. All rights reserved. 
         <br>AT&T and the AT&T logo are trademarks of AT&T Intellectual Property. 
        </font> 
       </td> 
      </table> 
     </body> 
    </cfdocumentitem> 
</cfdocument>