Tell us what’s happening:
I’m not sure what’s wrong with the background-color code. The error says it should have white background which it already does. Thanks in advance XD
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Cafe Menu</title>
<link href="styles.css" rel="stylesheet"/>
</head>
<body>
<div id="menu">
<main>
<h1>CAMPER CAFE</h1>
<p>Est. 2020</p>
<section>
<h2>Coffee</h2>
</section>
</main>
</div>
</body>
</html>
/* file: styles.css */
body {
/* User Editable Region */
/* background-color: burlywood; */
/* User Editable Region */
}
h1, h2, p {
text-align: center;
}
#menu {
width: 300px;
}
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Challenge Information:
Learn Basic CSS by Building a Cafe Menu - Step 22
Try adding the background color property of white in your CSS body tag.
body {
background-color:white;
}
1 Like
Thanks for replying.
I tried adding it like this:
body {
/* background-color: burlywood; */
background-color:white;
}
but it still shows the same error and doesn’t let me proceed. If I remove the /* */ section, it says " You should comment out the background-color: burlywood;
line in your CSS."
The instructions says:
In your style sheet, comment out the line containing the background-color
property and value, so you can see the effect of only styling the #menu
element. This will make the background white again.
Not sure if i’m missing a step involving the #menu part?
You code should look like this… in the css file
menu {
width: 80%;
background-color: burlywood;
margin-left: auto;
margin-right: auto;
}
It doesn’t seem to work either, it gave me the following error:
Sorry, your code does not pass. Keep trying.
Your body should have a white background.
I think it’s looking for a specific answer
I peeked into step 23 of the cafe menu, and it has something like this:
body {
/*
background-color: burlywood;
*/
}
I tried copy and paste this on step 22 but it still doesn’t work, giving me the same “Your body should have a white background.” error
Edit:
Welp I switched from Google Chrome to Firefox and it’s successful… Might be a weird bug on Chrome’s end or something XD
1 Like
noted and great it works.
system
Closed
June 28, 2024, 11:08pm
8
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.