how to set table background image in asp.net page

Posted by Shanky11 under ASP.NET on 5/14/2013 | Points: 10 | Views : 5691 | Status : [Member] | Replies : 2
i have created a table in asp.net page inside that i have to put background image to it
how can i do that or i this image comes in page background full
i am attaching the image this should come as a background color or table background anything




Responses

Posted by: Learningtorise on: 5/14/2013 [Member] Starter | Points: 25

Up
0
Down
Example

<!-- Place this between the document's <head></head> tags -->
<style type="text/css">
.myTableBg { width:180px;background:#dedede url(/pix/web_graphics/free_website_graphics/background_patterns/101Emboss8.gif) repeat;border-collapse:collapse; }
.myTableBg td, .myTableBg th { border:2px solid white;padding:5px; }
</style>


<table class="myTableBg">
<tr>
<th>Table header</th><th>Table header</th>
</tr>
<tr>
<td>Table cell 1</td><td>Table cell 2</td>
</tr>
<tr>
<td>Table cell 3</td><td>Table cell 4</td>
</tr>
<tr>
<td>Table cell 5</td><td>Table cell 6</td>
</tr>
</table>

http://hashtagakash.wordpress.com/

Shanky11, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Learningtorise on: 5/14/2013 [Member] Starter | Points: 25

Up
0
Down
In above CSS :

You can set both Background Color and Image using this line >

.myTableBg { width:180px;background:#dedede url(/pix/web_graphics/free_website_graphics/background_patterns/101Emboss8.gif) repeat;border-collapse:collapse; }


http://hashtagakash.wordpress.com/

Shanky11, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response