2014-03-26 49 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>