Soner
Soner

Reputation: 37

CSS background image border

td.back {
    background:#000 url('0.jpg');
        }

How do I make the background image look like <img border="4" src="0.jpg"/>

Any ideas?

Html code:

<table>
<table>
  <tr>
    <td></td>
    <td class="back"><img src="gif1.gif"/></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>

Upvotes: 0

Views: 12161

Answers (2)

Xella
Xella

Reputation: 1268

Try this:

td.back {
    background:#000 url('0.jpg');
    border: 4px solid #000;
        }

http://jsfiddle.net/ER4LB/ Or you can choose other options for border in w3schools

Upvotes: 2

Adam Sweeney
Adam Sweeney

Reputation: 386

    td.back {
        border-image:url('0.jpg');
        border: 4px solid #000;
}​

Upvotes: 0

Related Questions