Confused about step 20

My code:

body {
  background-color: burlywood;
<div> {
  width: 300px;
h1, h2, p {
  text-align: center;

The challenge: The div element is used mainly for design layout purposes unlike the other content elements you have used so far. Add a div element inside the body element and then move all the other elements inside the new div
I don’t understand where the div goes within the body

If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Ask for Help button located on the challenge (it looks like a question mark). This button only appears if you have tried to submit an answer at least three times.

The Ask for Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.


I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

1 Like

Its really important for you to include a link to the Step you are working on.


<div>...</div> is not CSS code. That’s HTML. You put it in the CSS section.

I understand that the help button is there for these questions, however, after pushing the button and choosing google search there were two searches answered. Neither one pertained to this question. Do you have another recommendation?

Is your Ask for Help button not creating a topic that you can submit?


You can keep creating your own posts instead of using the “Create a help post on the forum” option, but then you really need to include a link to the Step you are working on.

Great! Thank you but I do not understand where in my code do I place the div?

Please post a link to the Step.

The Step should start with HTML code visible, not CSS.

Thank you. Still new to this forum criteria but will try to correct it next time.

In the HTML.

When I try to place it under Body it changes all of my code on the menu

Please. Please post a link to the step.

If you have different code, please show that too.

Ok, I think I found the Step 20 you are using:

There are different things called “Step 20”, so the link is very, very important.

The page starts with only HTML visible

For this Step, you need to only make changes to the HTML. Make zero changes to the CSS.

1 Like

I can empathize with the ‘confused’ with the process. This is for Building a Cafe Menu, I believe seeing the little bit of code.
Instructions ask you to place a new div in body, which would be like placing a wrapper around a candy is my way of thinking. Everything between just below the body opening and just above the body closing should be within that new div.
Hope this clears some of your confusion. And, please, as stated in the previous posts, include what lesson and step you are on, and all coding so it is easier for others to assist.
You are doing awesome! Happy coding!

I am also confused with the div. I am trying to work challenge 21 which says 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. Create a new type selector in the style sheet that gives your div element a width of 300px . I have seen others code but I just need to understand the div in CSS

Please open a separate topic for each Step you need help with.

On every single topic please include all of your code and a link to the Step.

Based on the posts I’ve seen, it seems that you are confused about the structure of the Document Object Model (DOM). Imagine that each HTML page is like an outline. The difference between HTML and an outline is that you are specifying sections versus just lines. So, in outline form you would have:
I. html

  1. head
    a. meta statements
    b. title
    c. link statements
  2. body
    a. main
    b. section 1
    c. section 2
    x. footer

and, so on. But, the computer doesn’t understand outlines, so we have to make sections. The section is marked by open and closing tags, which you have been working with.

So, when the instructions tell you to create a

tag, you’ll add it to your HTML structure. When the instructions tell you to change the appearance or style of the tag, you’ll do that in your CSS file. Don’t forget the link the files with the tag or none of this will work. In step 20, you place the
between your tags. Then, when it said to make the div 300px wide, you would create a CSS rule as:
Mod Edit: Removed Answer

tip: be careful with the above rule unless you want every non-specific div to have a width of 300 pixels.

Best of luck,

dr. debugger

I have removed a part of your post that shows the answer for part of the challenge (making the width for the div). Although, the OP should be making a new topic for the new step they are on, we dont want them coming back to this one to find the answers given to them. We dont want any answer for the challenge given to the users because this way they wont learn and will expect answers to be given to them. Instead try to point them in the right direction with hints, and suggestions that

Just a heads up for future questions you answer,


1 Like

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