-1

I was trying to set the image in the background using the following code but the output comes out to be blank . please help!

<html>
<head>
<title>Hotel Registration form</title>
<style type="text/css">
body{
    background-image: url(file:///C:/Users/user/Desktop/WE/Pics/prac6/resort.jpg);
    background-repeat: no-repeat;
}
</style>
</head>
<body>

</body>
</html>
Guneet Kaur
  • 544
  • 1
  • 8
  • 26

1 Answers1

1

Use a relative path. As well create a project folder and make an order for your project. then it is really easy.

  • Project
    • folders (css/images/js/etc...)
    • main files (index/about/etc....)

<html>
<head>
<title>Hotel Registration form</title>
<style type="text/css">
body{
    background-image: url(img/resort.jpg);
    background-repeat: no-repeat;
}
</style>
</head>
<body>

</body>
</html>
WP Learner
  • 788
  • 1
  • 13
  • 34