Click here to Skip to main content
15,898,978 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to set HDr esolution image in background in html/css. for a website.
my image sizes.
width: 4608px
height: 3072px
Posted
Comments
Member 9411249 3-Oct-13 10:29am    
Noo this is not work for me :(
Bernhard Hiller 4-Oct-13 4:54am    
WTF?
That's almost 14 million pixels, surely beyond a megabyte...
And by the way, when the screen is only 1024x768, that will be a great experience...

try using this.. setting the size of the background
http://www.w3schools.com/cssref/css3_pr_background-size.asp[^]
 
Share this answer
 
create one css class like

.body
{
background:url(Your_Image_Url);
background-repeat:no-repeat;
}


Then in HTML body content give that class name.

HTML
<html>
<head></head>
<body class="body">
</body>
</html>
 
Share this answer
 
Comments
Member 9411249 3-Oct-13 10:30am    
I tried this but this is not done
londhess 3-Oct-13 10:52am    
Same code working for me.
<html>

<style type="text/css">
.body
{
background:url("C:\Data\HTML\Desert.jpg");
background-repeat:no-repeat;
}
</style>

<body class="body">
</body>
</html>
There might be many ways. One is by using css :

C#
html {
  background: url(yourimage.jpg) no-repeat center center fixed;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}
 
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