Copy link to clipboard
Copied
Hi,
I want the page to have the image background but why 1 is worked and 2 isn't, please explain?
1. image is displayed
<td background="#imageDirPath#/images.cfm?test_1.jpg"></td>
2. image is not displayed
<body background="#imageDirPath#/images.cfm?test_1.jpg">"></body>
3.
<style>
.slide1
{
background-image:url(images/test_1.jpg);
width:769;
height:573;
}
is there the way to call the background-image:url(images/test_1.jpg) from style to call the imageDirPath#/images.cfm?test_1.jpg?
image.cfm
<cfcontent file="#GetDirectoryFromPath(GetCurrentTemplatePath())#images/#CGI.QUERY_STRING#" type="image" deletefile="No">
thanks
Copy link to clipboard
Copied
Not quite sure what the images.cfm code is doing for you, looks like you are over-complicating things; simply serve the image directly.
1.
<td background="<cfoutput>#imageDirPath#</cfoutput>/test_1.jpg"></td>
2.
<body background="<cfoutput>#imageDirPath#</cfoutput>/test_1.jpg"></body> (you had an extra "> in there)
3.
<style>
.slide1
{
background-image:url(<cfoutput>#imageDirPath#</cfoutput>/images/test_1.jpg);
width:769;
height:573;
}
</style>
<td class="slide1"></td>
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more