-2
(Solved) I don’t know what I did, I just know it’s working now :thinking:
Good morning/late/evening.
I started studying Html5 this week, but ended up getting stuck at the time of inserting a background image in the project. I tried to put the entire directory of the image, however it still doesn’t work...
Here’s a part of the code in question
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8"/>
<title>Google glass foi uma bosta</title>
<style>
body {
background-image: url("site-background.jpg");
background-color: gray;
color: black;
}
p {
text-align: justify;
text-indent: 50px;}
</style>
</head>
<body>
I don’t know if it will, but you don’t need to quote the name of the image inside the background-image: url( site-background.jpg ); and check if the extension is . jpg or . jpge vc tb can try to put a height on the body, like height:100%
– hugocsl
Possible duplicate of Use of CSS background-image and background-color
– Guilherme Nascimento