Tell us what’s happening:
Describe your issue in detail here. ikind of in troble can i get a clarificationw how is a body selector look like?
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>
<main>
<h1>CAMPER CAFE</h1>
<p>Est. 2020</p>
<section>
<h2>Coffee</h2>
</section>
</main>
</body>
</html>
/* file: styles.css */
/* User Editable Region */
h1, h2, p {
text-align: center;
}
body,brown{text-align:center}
/* User Editable Region */
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Challenge: Learn Basic CSS by Building a Cafe Menu - Step 18
Link to the challenge:
The instruction: " Add another style to the file that changes the background-color
property to brown
for the body
element."
element {
property: value;
}
‘body’ is the element,
‘background-color’ is the property,
‘brown’ is the value.
1 Like
why is it when i enter the the text it is telling me that i should set the background-colour property to brown
If I understood you well, you want to know why the hint sometimes leads you in the wrong direction. The short answer would be: It would be too complicated to predict every possible scenario about what can go wrong in someone’s approach to trying to resolve the challenge.
Otherwise, you should follow the rule given in the previous CSS selector:
h1, h2, p {
text-align: center;
}
Instead of this multiple elements selector, now you have the ‘body’
Instead of the ‘text-align’ property, you have the ‘background-color’ property
instead of the value of “center”, now you have the value of ‘brown’.
i did exctaly what i was asked for and followed the instructions.What you are not understanding is that i did exctaly that and i still did not pass
its telling me to set the background-set color to brwon dont know what to do now.Thats to my understanding
i deleted the first body selector and added the new the background-colour and body and others
Post the entire html and css code here. Use the </>
button to format code properly.
system
Closed
December 27, 2023, 9:05pm
9
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.