Tell us what’s happening:
im not sure what im doing wrong i keep getting that my background element should be set to the url
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 class="menu">
<main>
<h1>CAMPER CAFE</h1>
<p>Est. 2020</p>
<section>
<h2>Coffee</h2>
</section>
</main>
</div>
</body>
</html>
/* file: styles.css */
/* User Editable Region */
body {<backgroung-image=(https://cdn.freecodecamp.org/curriculum/css-cafe/beans.jpg)>}
/* User Editable Region */
h1, h2, p {
text-align: center;
}
.menu {
width: 80%;
background-color: burlywood;
margin-left: auto;
margin-right: auto;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
Challenge Information:
Learn Basic CSS by Building a Cafe Menu - Step 28
hbar1st
2
check the spelling and syntax. You should write the exact spelling needed and use css syntax (not html syntax)
Tell us what’s happening:
my background element is set to the url why
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 class="menu">
<main>
<h1>CAMPER CAFE</h1>
<p>Est. 2020</p>
<section>
<h2>Coffee</h2>
</section>
</main>
</div>
</body>
</html>
/* file: styles.css */
/* User Editable Region */
body {backgroung-image:(https://cdn.freecodecamp.org/curriculum/css-cafe/beans.jpg;)}
/* User Editable Region */
h1, h2, p {
text-align: center;
}
.menu {
width: 80%;
background-color: burlywood;
margin-left: auto;
margin-right: auto;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
Challenge Information:
Learn Basic CSS by Building a Cafe Menu - Step 28
You are not specifying the value correctly.
This is what the lesson asks you to do, but you have missed the url
at the start. And, you have misspelled background
Mod edit: code removed
hbar1st
5
Hi there,
I see that you have been asked before to not open duplicate topics (for the same challenge) in this forum.
Please stop doing that immediately as this is your final warning.
When you need to ask a follow up question, simply reply to the original post. Do not open another topic.
Thank you for your attention.
Your duplicates have been merged.
body {background-image:url(https://cdn.freecodecamp.org/curriculum/css-cafe/beans.jpg;)} i add the url and fixed the spelling of background but i still get the same message
hbar1st
7
Share the whole code for more help pls.
body {background-image:url(https://cdn.freecodecamp.org/curriculum/css-cafe/beans.jpg;)}
h1, h2, p {
text-align: center;
}
.menu {
width: 80%;
background-color: burlywood;
margin-left: auto;
margin-right: auto;
}
hbar1st
9
The url example given in the step doesn’t have a semicolon so I would try without that.
yea it worked thsnks so much