Tell us what’s happening:
Describe your issue in detail here.
Your code so far
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="./styles.css">
<title>RPG - Dragon Repeller</title>
</head>
<!-- User Editable Region -->
<body>
<div id="game">
<div id="stats">
<div id="controls">
<div id="monsterStats">
<div id="text">
</div>
</div>
</div>
</div>
</div>
</body>
<!-- User Editable Region -->
</html>
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Challenge Information:
Learn Basic JavaScript by Building a Role Playing Game - Step 2
Learn to Code — For Free
system
December 23, 2023, 5:29pm
2
You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.
lasjorg
December 23, 2023, 5:39pm
3
You are not asked to nest the div
elements inside each other, they should be sibling elements (on the same “level”).
<div class="parent">
<div></div>
<div></div>
<div></div>
<div></div>
</div>
Hey @ainchwarpranay welcome to the forum.
The instructions say
Create four div
elements within your #game
element. Give them the following respective id
values, in order: stats
, controls
, monsterStats
, and text
.
You need to have one main div and 4 other divs inside it right now you have nested divs inside one another I would suggest you reset the lesson to get the original code then do as the instructions say
Happy coding
I also am stuck here.
<body>
<div id="game">
<div id ="stats"</div>
<div id = "controls"</div>
<div id = "monsterStats"</div>
<div id = "text"</div>
</div>
</body>
Why is this wrong?
Hello @middletown !
The above are missing the closing > bracket for the opening div tags.
middletown:
ts"</
Please for future posts, or if you still need help, use the help button to create your own post and code for assistance.
Happy coding!
system
Closed
June 27, 2024, 2:20am
7
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.