Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to add a background image in asp.net?
Posted

CSS
body{
   backgroud: url('image.jpg');
}

More properties (repeat, position, etc) at http://www.w3schools.com/css/css_background.asp[^]
 
Share this answer
 
v2
Comments
_Amy 13-Aug-12 2:20am    
I don't think so the property backgroud will on all the browsers.
StianSandberg 13-Aug-12 2:31am    
The background property is supported in all major browsers.
_Amy 13-Aug-12 2:35am    
Check in your given link. :)
StianSandberg 13-Aug-12 2:41am    
I gave that link for a reason ;) But css background will work in major browsers. It's CSS1!
Hi,
Try this:
CSS
body
{
    background-image:url('smiley.gif');
    background-repeat:no-repeat;
    background-attachment:fixed;
}


--Amit
 
Share this answer
 
Comments
ridoy 13-Aug-12 2:51am    
I agree with it..I do that in this way...
body
{
margin: 0;
padding: 0;
background: url("image/background.png")no-repeat scroll 0 0 transparent;
}
Like this[^]?

Don't repost, this is extremely ugly...
 
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