Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello All
Actually i want to place a background picture in my ASP.NET table.
And i also want to place different images in different table cells also.
How can I do this so that at the time of execution i can see both the images.
Also tell me how to make one of the image dull.

Thanks in Advance
With regards
Shweta :rose:
Posted

You can set background image using style property of table, and also for cell. see below markup

XML
<table cellpadding="5" cellspacing="5" class="style1"
    style="background-image: url('table_bg.jpg')">
    <tr>
        <td style="background-image: url('cell1_jpg.jpg')">
            1</td>
        <td style="background-image: url('cell2_jpg.jpg')">
            2</td>
    </tr>
    <tr>
        <td style="background-image: url('cell3_jpg.jpg')">
            3</td>
        <td style="background-image: url('cell4_jpg.jpg')">
            4</td>
    </tr>
</table>
 
Share this answer
 
through CSS you cab set background images in table and cells. check the link, one of the best css tutorials
http://www.w3schools.com/css/default.asp[^]
 
Share this answer
 
Comments
Roger Wright 13-Jul-10 23:57pm    
Reason for my vote of 5
Possibly the best single resource for web development.
Just check this hope this css wil help U.
Thankx......
http://www.w3schools.com/css/css_image_gallery.asp[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900