I am facing an issue with displaying my background image on my website. I have added the background image in my style.css file and linked it in .
I placed {% load staticfiles %} above the style tag, but I believe this may be incorrect.
I have verified my settings and the STATIC_URL is set as follows: STATIC_URL = '/static/'
Below is my CSS code
style.css
body {
background:slategray url("/personal/static/personal/images/background.gif")no-repeat right bottom;
}
Here is my HTML code
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Mr. Hart</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
<div class="row">
<div class="col-md-8">
<a href='/' style="display: inline-block; text-decoration-color: #1a8002;">Home</a>
<a href='/blog/' style="display: inline-block; text-decoration-color: green;"> Blog </a>
<a href='/Aboutme/' style="display: inline-block; text-decoration-color: green;"> About Me </a>
<a href='/stocks/' style="display: inline-block; text-decoration-color: green;"> My stock Tips </a>
<a href='/crypto/' style="display: inline-block; text-decoration-color: green;"> Crypto </a>
</div>
<div class="col-md-4">"This is where my contacts stack,github, stocktwits, twitter, all picture links "</div>
</div>
{% load staticfiles %}
<style type="text/css">
html,
body {
background: url("{% static "/personal/style.css" %}") no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
</style>
</head>