Jump to content

[SOLVED] Background image in table cell


Yammyguy

Recommended Posts

Hello!

 

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...

Link to comment
Share on other sites

try:

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

 

if that doesnt work try specifying a width and height.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.