Click here to Skip to main content
15,891,905 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In the designing part of asp.net how to stretch the background image?
I used the below line to set the background image. The image is displaying but it not stretched.
<body background="images.jpg"/> 

how to stretch the background image?
Posted
Updated 23-Jan-12 18:50pm
v2

Hi,

Try like this,

HTML
<body style="background-image: url(images.jpg); width:100%; height:100%;">
Body of page goes here
</body> 
 
Share this answer
 
v2
Comments
Tech Code Freak 24-Jan-12 0:56am    
5up!
thatraja 24-Jan-12 1:44am    
5!
psgviscom 24-Jan-12 5:08am    
width and height is not the attribute of body
Member 14054567 28-Nov-18 0:40am    
It's not working
Go through the below links

Here[^]

Here[^]

Thanks
--RA
 
Share this answer
 
Comments
Tech Code Freak 24-Jan-12 0:55am    
5up!
Good links!
Rajesh Anuhya 24-Jan-12 0:56am    
Thanks Freak
thatraja 24-Jan-12 1:45am    
You called him "Freak"? :D
Rajesh Anuhya 24-Jan-12 2:35am    
:D, raja, how can i call it in Tamil???
thatraja 24-Jan-12 1:44am    
5!
apply css class and use property backgrund-image-url:'url for image' background repeat:repeat x or y as per image.
 
Share this answer
 
Comments
Member 10252259 6-Oct-13 9:33am    
i want one background image show in centered?

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