This is my index.php page
<?php
//echo session_save_path();
error_reporting(E_ALL);
ini_set('display_errors', 1);
include ("database.php");
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"content="width-device-width, initia=scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/
[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous">
<script defre src="https://cdn.jsdelivr.net/npm/
[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" crossorigin="anonymous"></script>
<link rel="stylesheet" href="styles.css">
<title>index</title>
</head>
<body>
<h2>hello world</h2>
<div class="background-image">
<div class="form-box"></div>
</div>
</body>
<style>
.background-image{
background-image: url('/blueSunset.jpg');
background-size: contain;
width: 200px;
height: 200px;
}
</style>
</html>
This is my styles.css page
h2{
color: blue;
}
.background-image{
background-image: url(blueSunset.jpg);
width: 200px;
height: 200px;
}
My image is in the same directory as the two files. When I try styling using class it doesn't work in all cases not just this instance