4 replies [Last post]
Credo
Offline
newbie
Last seen: 13 years 15 weeks ago
Joined: 2009-03-26
Posts: 3
Points: 0

Hello!

I'm sorry if I'm in the wrong forum. I've just registered, and I'm still not 100% familiar with the layout... Sad

I'm having a hard time trying to display a background image in one of my table cells. Dreamweaver is previewing the table with the image, but when I post to the server and preview it's not there. yes, the image is there, and the path to the image is correct. here is the CSS code I'm using:

.green {
     background-color: #f6f6f6;
     background-image:url(images/green_bg.jpg);
     background-position: top left;
     background: no-repeat;
     }

I'm putting the code here:

<td class="green">

As I mentioned before it is showing up in dreamweaver, but when I view the on the site, it just displays the background color. I've also removed the background color to verify that wasn't canceling it out..

any help would be greatly appreciated...

Deuce
Deuce's picture
Offline
Guru
Somewhere, USA
Last seen: 4 years 51 weeks ago
Somewhere, USA
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4424
Points: 1843

Is the table for tabular

Is the table for tabular data or are you trying to layout your design with tables?

all ยป http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

Credo
Offline
newbie
Last seen: 13 years 15 weeks ago
Joined: 2009-03-26
Posts: 3
Points: 0

it's for tabular data. I

it's for tabular data. I hate laying things out with tables...

I might have figured it out though.

Titan793
Offline
Enthusiast
Syracuse, NY
Last seen: 11 years 33 weeks ago
Syracuse, NY
Timezone: GMT-5
Joined: 2009-02-20
Posts: 285
Points: 5

Did you manage to get this

Did you manage to get this working? I was going to suggest setting a width and height to the td class.

Also the background: no-repeat; is stopping anything from showing in my tests.. try changing that to background-repeat: no-repeat; and see if that helps.

Just ignore this if you already got it working lol..

Credo
Offline
newbie
Last seen: 13 years 15 weeks ago
Joined: 2009-03-26
Posts: 3
Points: 0

Titan793 wrote:Did you

Titan793 wrote:

Did you manage to get this working? I was going to suggest setting a width and height to the td class.

Also the background: no-repeat; is stopping anything from showing in my tests.. try changing that to background-repeat: no-repeat; and see if that helps.

Just ignore this if you already got it working lol..

Thanks for checking in! I did actually get it working, and it was exactly that. I changed background: no-repeat; to background-repeat: no-repeat and everything works perfectly.

Thanks everyone! Smile