Click here to Skip to main content
15,886,836 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hai every one,
i have a another problem in stretch html table td tag background image stretch.i need to stretch td background image with 100% width and 71px height.
i have following code for streach image using css
CSS
#tdbg 
{
      background-size: 100% 71px;
      background-image: url('images/img_Header03.png');
      background: no-repeat center center fixed;
      filter: progid:DXImageTransform.Microsoft.AlphaImageLoader( src='images/img_Header03.png', sizingMethod='scale');
}


i need to stretch width of the image only not for height 71px fixed no need to change.How ?
pls reply asap.

Note: i need to stretch width of the image only not for height ,bcz the image height is less than td height ,so i need some space at the bottom,bcz i use vertical align as top.

Regards
Aravind.
Posted
Updated 2-Oct-13 21:46pm
v2

1 solution

Hello Aravind,

From what I understood, you want this effect:
#tdbg 
{
    background-image:url('paper.gif');
    background-repeat:no-repeat;
    background-size: 100% 71px;
}


Use this code with your image to see if it works. I can it doesn't, please explain what results are you getting.
Also, have a look at w3schools_CSS
 
Share this answer
 
Comments
Aravindba 14-Oct-13 0:11am    
Hi thank for ur reply,the above codes works in ie 9,chrome and mozila,but in ie 8 not,
my need is need to work ie8
Aravindba 14-Oct-13 21:23pm    
Hi thank u for ur replay again,but i mention clearly in my first question,i am use background for td tag not for image control or img ,bcz if i use background in image control we cant put any controls in center of image,but insdie td tag we can put any controls like label,images ....
so my need is streah background for td tag only not for any other control

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