background image no-repeat

Discussion in 'PHP' started by durgesh871, Jun 30, 2010.

  1. #1
    hello there, i have 4 rows in which i have a background image, the image is 20px and the row 1s 30px, now obviously the image is repeated again directly below, i've tried many ways in which to get the repeat-x/y working but to no avail, can some one help me.

    
    echo ("<table border = '0' width = '575' class='image1'  id='image1' cellspacing='0' cellpadding='2'> ");
    
    while ($rows = mysql_fetch_row($result))
    {
    
    echo ("<tr align='left' ><td background='http://www.example.com/images/centerimg.png'>$rows[9]</td></tr>");
    
    
    }
    //finish or table
    echo "</table>";
    
    Code (markup):

     
    durgesh871, Jun 30, 2010 IP
  2. themullet

    themullet Member

    Messages:
    110
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #2
    rather then setting background in your table cell use css?

    <td class="example">
    example {
    background:#ffffff url('http://www.example.com/images/centerimg.png') no-repeat
    }
     
    themullet, Jun 30, 2010 IP