Click here to Skip to main content
15,892,674 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all, i new to asp.net also web techenology, i have creatd static web page i have set background image for <body> tag, but that image is not at all stretch in screen, i have given width=100% also but no use of it, anyone have css file for solve this issue, please tell give me some sample code for solve this,

thanks in advance
Posted
Comments
Hiren solanki 3-Jan-11 3:58am    
That isn't need to include in coding , you need to put in CSS file. or inside <style></style> tag.

Here is one possible solution:

How Do you Stretch a Background Image in a Web Page[^]

Regards
Espen Harlinn
 
Share this answer
 
Apply this CSS to body and this will work.

CSS
body {
  background: url(bgimage.jpg) no-repeat;
  background-size: 100%;
}
 
Share this answer
 
Comments
sameertm 3-Jan-11 3:56am    
i applied these coding but no use of it
Sure!

Here you go: How Do you Stretch a Background Image in a Web Page[^]
CSS
body {
  background: url(bgimage.jpg) no-repeat;
  background-size: 100%;
}
 
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