I have been trying to set a background image for my website using bootstrap 5 but it is not showing
I use external CSS to set the background image but it is not working
The code is:
body {
background-image: url(images/bgr.jpeg);
}
I will like to know what I can do to set the background image for my website correctly. Thanks
3
Answers
try surrounding the source in quotes so:
top result
You can add background image using inline CSS, I hope it’s better out of external CSS
Remember it, we don’t need to use use
"images/bgr.jpeg" for our path
with have to use just path nameimages/bgr.jpeg
Also we can set
width: 100%; height: 100vh;
etci think you need to add class on body in html like this
<body class="bg">
then call it in css