Learning Basic CSS by Building a Cafe MenuStep 21

div #menu-id

{width:300px;}

body {

background-color: burlywood;

}

h1, h2, p {

text-align: center;

}

}

error: You should have a #menu selector.*

i dont understand. i already checked other topic

Hey, Kindly tell us where you’re having problems with your code. Describing your problem is the quickest way we can help you.

hello. i dont know how i should do this. i receive an error: You should have a #menu selector. i dont know where to put it

Can I see your code?

body {
  background-color: burlywood;
}

h1, h2, p {
  text-align: center;
}
div{ 
  width: 300px;
}

i dont understand why i have an error saying: You should have a #menu selector.

Let’s talk about how to select an id. You add an ID selector by placing a hashtag in front of the ID name then the property and value follows. Check the example below.

#id name{ property: value;}

still the same error

Let me see your updated code.

body {
  background-color: burlywood;
}
#menu-id{
  width: 300px;
}
h1, h2, p {
  text-align: center;
}

You do not need to have the text id at the end unless it is part of the selector.

finally! it worked. thank you!

You are welcome mate.

text id is on the selector end untill he/she didn’t required or command to you.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.