2013-08-07 38 views
2

我使用ColdFusion 9.0.1使用<cfpresentation>標籤創建PPT。演示文稿會生成,但其中的信息在編碼時不會顯示。我正在使用<div>標籤創建柱狀輸出。但是,在PPT中生成時,格式將被忽略,數據將顯示爲全文文本行,並且右側欄將直接顯示在左側欄信息的下方。以下是<cfpresentation>中的css和html代碼。有關如何使代碼和演示文稿完全顯示爲已編碼的任何想法,即柱狀輸出?cfpresentation不保留PowerPoint格式的div

content { 
clear: both; 
width: 500px; 
padding-bottom: 10px; 
overflow:hidden; 
margin-left:20px; 
margin-right:20px; 
} 
#contentLeft { 
float: left; 
width: 250px; 
margin-left:10px; 
} 
#contentRight { 
width: 250px; 
margin-left:55%; 
} 

HTML:

<cfpresentationslide> 

    <div id="content" style="font-size:10px;"> 
     <div id="contentLeft"> 
      <span style="font-weight:bold;">&bull;&nbsp;&nbsp;#title# - </span> 
      <span style="font-weight:normal;">#backupinfo#</span><p></p> 
     </div> 

     <div id="contentRight"> 
      <span style="font-weight:bold;">&bull;&nbsp;&nbsp;#title# - </span> 
      <span style="font-weight:normal;">#backupinfo#</span><p></p> 
     </div> 
    </div> 

</cfpresentationslide> 

回答

1

我的猜測是,該<cfpresentationslide>標籤不能從你的樣式表拉CSS樣式。嘗試在<cfpresentationslide>標記內使用內聯樣式代替content,contentLeftcontentRight

事情是這樣的:

<cfpresentationslide> 

<div style="font-size:10px; clear:both; width:500px; padding-bottom:10px; overflow:hidden; margin-left:20px; margin-right:20px;"> 
    <div style="float:left; width:250px; margin-left:10px;"> 
     <span style="font-weight:bold;">&bull;&nbsp;&nbsp;#title# - </span> 
     <span style="font-weight:normal;">#backupinfo#</span><p></p> 
    </div> 

    <div style="width:250px; margin-left:55%;"> 
     <span style="font-weight:bold;">&bull;&nbsp;&nbsp;#title# - </span> 
     <span style="font-weight:normal;">#backupinfo#</span><p></p> 
    </div> 
</div> 

</cfpresentationslide> 

或者你也許可以創建一個單獨的HTML文件與你想要的格式則包括使用<cfpresentationslide>標籤的src屬性。也許這將允許使用外部樣式表,但我只是猜測。

Link to the online documentation for cfpresentationslide

+0

我使用了內聯樣式並且工作。我想你是對的不能拉CSS樣式。 –