#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2005
    Location
    uk
    Posts
    109
    Rep Power
    10

    Placing Background Image in <TD> Cell


    I'm trying to get a background image in a TD cell but it just wont work.

    Here is the code I am trying:

    Code:
    <td id="content" colspan="2" valign="top" style="background: url(http://www.omittedsite.com/images/bg_wrapper.gif) repeat-x">
    Any idea what it could be?

    JH
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2012
    Location
    Troy, NY
    Posts
    46
    Rep Power
    68
    I did a quick test for your issue and it seems that the image in question does not exist. I would try re uploading the image.

    Code:
    <!DOCTYPE html>
    <html>
    <head>
    <title>Table Test</title>
    <style <style type="text/css">
    table {margin: 0 auto; width: 50%; }
    td{border: 1px solid #333; padding: 20px; text-align:center; }
    </style>
    </head>
    
    <body>
    <table>
      <tr>
        <td id="content" valign="top" style="background: url(http://www.omittedsite.com/images/bg_wrapper.gif) repeat-x">This td should have a<br> background image</td>
        <td>2</td>
        <td>3</td>
        <td>4</td>
        <td>5</td>
      </tr>
    </table>
    </body>
    </html>

IMN logo majestic logo threadwatch logo seochat tools logo