I’ve already wrote the CSS code for this. It’s saying I should set my margin properties to Auto, which I’ve already done. Here’s my code:
body
div {margin-left: auto;}
div {margin-right: auto;}
Here’s the link to the challenge.
Learn Basic CSS by Building a Cafe Menu: Step 26 | freeCodeCamp.org
1 Like
Before I give you the answer here’s a hint:
margin left & right needs to be in the same div element not separately.
3 Likes
Hmm, still don’t understand it. Here’s my current code now.
div {margin-left: auto; margin-right: auto;}
I just copied & paste your code into the challenge link and it said code passed.
div {
margin-left: auto;
margin-right: auto;
}
2 Likes
Hi @Egaul98 ,
You have removed the starter code :
div {
width: 80%;
background-color: burlywood;
}
You should add the new properties within the already existing div
selector.
1 Like
system
Closed
7
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.