Background image not showing up on html page

Joined
Sep 23, 2023
Messages
2
Reaction score
0
I am trying to add a background image to an html page but for some reason it will not work. I can change the background color no problem but not the image. I have pasted the html and css code below.


<!doctype html>

<head>
<title>Meet For Pleasure</title>
<link rel="stylesheet" href="Homepage.css">

</head>

<body>

<div class="footer__bottom wow fadeInUp" data-wow-duration="1.5s">
<div class="container">
<div class="footer__content text-center">
<p class="mb-0 text-white">All Rights Reserved &copy Meet For Pleasure</a> || Design By: Jonathan Quiles
</p>
</div>
</div>
</div>
</footer>

</body>

/*Selector {
property: value;}*/

body{
background-image: url(img_logodesign.bmp;)
}


</html>
 
Joined
Nov 13, 2020
Messages
301
Reaction score
36
Try
body{
background-image: url("img_logodesign.bmp");
}
Notice the quotes.
 
Joined
Sep 23, 2023
Messages
2
Reaction score
0
I can change the background color no problem. I just dont know what is wrong with the image. The above suggestion did not work for me
 
Joined
Jul 4, 2023
Messages
341
Reaction score
39
body{
background-image: url(img_logodesign.bmp);
}
In short, BMP is not ideal for web use because:
  • Large File Size: BMP files are big and slow to load.
  • No Compression: They lack compression, making them impractical for the web.
  • Limited Browser Support: Not all browsers support BMP.
  • No Transparency: BMP doesn't support transparent backgrounds.
For web graphics, formats like JPEG (for photos) and PNG (for graphics with transparency) are preferred due to smaller file sizes and better web compatibility.


Check, background-image [ 1 ] [ 2 ] [ 3 ]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,708
Messages
2,569,347
Members
44,654
Latest member
7Jhamal74

Latest Threads

Top