Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

any ideas why a background image tag is not working?

Status
Not open for further replies.

photoxprt1868

Programmer
Jul 22, 2005
76
US
Hello,

This simple tag is not working, and I can't seem to figure out why. This is a cfm file.

<td background="/images/rightShadow.jpg" class="rightBG">&nbsp;</td>

I've tried it with and without the / infront of images. In dreamweaver it looks good the way it's supposed to look, but when I preview it, the shadow doesn't show up. The class that you see there rightBG is a style which also has the same background applied to it.

Code:
.rightBG{
width:28px;
background-image:url(/images/rightShadow.jpg);
background-repeat:repeat-y;
}
 
actually, this is bizarre. It's working in the production server, but not locally in my machine.

Any ideas why? Thank you very much.
 
This isn't really a coldfusion quetion, its more like an HTML question (forum215). But in any case, did you check to see if the image is placed on the right directory on your local machine? If it works fine on the production machine then the code is right. Make sure the image is saved in the right directory.


____________________________________
Just Imagine.
 
Why do you have the background image defined both as an attribute on the <TD> tag and in your CSS ... i know when running HTML4 through the W3 Varification process it doesnt like have the Background as an attribute.

Like GUJ duggested, check the directory for the image on your local machine. that sounds like it is the root of your issue.

Rob
 
yes the directory is good. I defined it in both css and td in a desperate attempt. I posted the question here because everything was fine when it was html, but when I converted to cfm with includes and stuff is when it started acting up
 
photoxprt1868 said:
...with includes and stuff...
This means that it is almost definitely a directory issue. Remember, an include will act as if it's in the directory that it's INCLUDED IN, not the directory that it came from.


Hope This Helps!

ECAR
ECAR Technologies

"My work is a game, a very serious game." - M.C. Escher
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top