Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

td background vs. body background

Explorer ,
Aug 09, 2011 Aug 09, 2011

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

TOPICS
Getting started
523
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 09, 2011 Aug 09, 2011
LATEST

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>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources