Referencing an image in CSS

I am trying to use the following CSS to reference an image as a background for a table, but it’s not working. I have the image uploaded to the resource file. I believe that the problem is occuring where I am trying to reference the image. Our site is www.dpsnc.net and the server name is welcome.nsf.

the CSS is:

table #children

{

background-image: url(“http://www.dpsnc.net/welcome.nsf/imagename.jpg”);

background-repeat: no-repeat}

the html is:

TIA

-Bruce Gilbert

Webmaster

DPS

Subject: referencing an image in CSS

Hi Bruce,

I’m not an expert on CSS, but I think the problem is that you’ve used the element name before the ID in your style.

In other words, if you referenced it as the following:

#children table {

}

it might work. In the above case, this means that any

tags with the ID element of “children” will take the above style.

If this still doesn’t work, it could be because your table cells (or their margins) cover your background image. Try the above but without any cells in the table and see if it works.

Subject: referencing an image in CSS - solution

Hi

According to W3C you have the right format

http://www.w3.org/TR/REC-CSS2/colors.html

But neither IE nor Mozilla will display the image.

If you instead use:

background-image: Url(‘http://www.dpsnc.net/welcome.nsf/imagename.jpg’);

or

background-image: Url(http://www.dpsnc.net/welcome.nsf/imagename.jpg);

it will work in both browsers.

regards

Jesper kiaer

http://www.jezzper.com