/* file: styles.css */
/* User Editable Region */
body {
background-color: burlywood;
}
div #menu-id {
width: 300px;
}
h1, h2, p {
text-align: center;
}
/* User Editable Region */
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0
Challenge: Learn Basic CSS by Building a Cafe Menu - Step 21
The goal now is to make the div not take up the entire width of the page. The CSS width property is perfect for this.
You can use the id selector to target a specific div element. An id selector is defined by a name with a hash symbol directly in front of it, like this:
Use the #menu selector to give your element a width of 300px.
@commakameleon
Welcome to our community! Please use the Help? which appears after three unsuccessful attempts on a step? By using this way to submit codes and questions, it allows people in the community to assist quickly and accurately to your concerns.