body {
background-color: burlywood;
}
<div> {
width: 300px;
}
h1, h2, p {
text-align: center;
</div>
}
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.
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.
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.
Hello!
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
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
head
a. meta statements
b. title
c. link statements
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.
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