WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Why is my table row background image not appearing in Wordpress.

Is the stylesheet for the theme suppressing it in some way and if so, how can one override that to make the image show, or is there some other fault causing it not to appear?

Note the other image in the table does display properly so the path to the files seems to work ok.

<table width="250" height="200" cellpadding="0" cellspacing="0" border="1">
    <td WIDTH="250" HEIGHT="82" colspan="3"><img src="/wp-content/plugins/xxxxxxwidget/image1.png">
    <td style="background-image:url(/wp-content/plugins/xxxxxxwidget/image2.png) no-repeat center;" WIDTH="250" HEIGHT="45" colspan="3">

Any suggestions?

share|improve this question
up vote 0 down vote accepted

What does Firebug or Chrome Developer Tools report on the rendered background image URL? Does it return a 404?

Try changing this:


to this:

style="background-image:url(<?php echo wp_plugins_dir(); ?>/xxxxxxwidget/image2.png)
share|improve this answer
As I said in my original text it's NOT the path that is at fault. I have also tried replacing it with: style="background-image:url(localhost/wp-content/plugins/xxxxxxwidget/image2.png) – Cheeky Cherub Jul 4 '11 at 19:54

Css syntax wrong here:

<td style="background-image:url(/wp-content/plugins/xxxxxxwidget/image2.png) no-repeat center;" WIDTH="250" HEIGHT="45" colspan="3">

'background-image' accepts only an url, no other parameters such as no-repeat and center. Use instead:

<td style="background:url(/wp-content/plugins/xxxxxxwidget/image2.png) no-repeat center;" WIDTH="250" HEIGHT="45" colspan="3">

Should help.

share|improve this answer
The worst thing is, I had originally put background but someone else told me to change it...typical, LOL - Thank you so much, that worked a treat, you have saved my life! – Cheeky Cherub Jul 5 '11 at 9:15
Don't get why is the other answer accepted as the good one for the topic... – kevin Jul 7 '11 at 14:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.