Click here to Skip to main content
16,016,736 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
The image should fill the cell 100%.
i added table to the web form for clear layout of my web page.
in that a cell should contain the image. i added image from tool box. but it is filling partially, i.e., only a part of the cell.

Can u pls help me out from these? Thank u..
Posted

Lets Consider this is your table with className attribute as shown below

< table>
< tr>
< td class="img1">Text< /td>
< td class="img2">Text 2< /td>
< /tr>
< /table>


Then write Css like below:

.img1
{
background-image:url('images/back.jpg');
background-repeat:norepeat:
}
.img2
{
background-image:url('images/back2.jpg');
background-repeat:norepeat:
}
 
Share this answer
 
use css class for every td tag not the css on td
 
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