Learn Basic CSS by Building a Cafe Menu - Step 51

*Tell us what’s happening:
I noticed that it is incorrectly done. But how do I get it right.

Your code so far

/* file: index.Ext.html */
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;
}

.item p {
  display: inline-block;
}

.flavor {
  text-align: left;
  width: 75%; .dessert { text-align: left; width: 75%;}
}

.price {
  text-align: right;
  width: 25%
}
/* file: styles.Ext.css */
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;
}

.item p {
  display: inline-block;
}

.flavor {
  text-align: left;
  width: 75%; .dessert { text-align: left; width: 75%;}
}

.price {
  text-align: right;
  width: 25%
}

Your mobile information:

iPhone - iOS17.3.1

Challenge: Learn Basic CSS by Building a Cafe Menu - Step 51

Link to the challenge:

it looks like you have css in your html file, that is not a good thing to do

you can’t add a rule inside an other, to select two different things and give the same css rules to both you can use a list selector

4 Likes

Saved me big time. Thanks a lot.

Correct code format is this:

MOD Solution removed

Hi @radiant_mist

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

That is your answer guys

MOD Solution removed

Hi @radicaledwardd

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.