Learn CSS Colors by Building a Set of Colored Markers - Step 14

Tell us what’s happening:
Describe your issue in detail here.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Colored Markers</title>
    <link rel="stylesheet" href="styles.css">
  </head>
  <body>
    <h1>CSS Color Markers</h1>

<!-- User Editable Region -->

    <div class="container">
       <div class="marker">
          <div class="marker">
            </div></div></div>

      <div class="marker"> 
        </div>
 

<!-- User Editable Region -->

  </body>
</html>
/* file: styles.css */
h1 {
  text-align: center;
}

.marker {
  width: 200px;
  height: 25px;
  background-color: red;
  margin: auto;
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36

Challenge: Learn CSS Colors by Building a Set of Colored Markers - Step 14

Link to the challenge:

It’s helpful if you can learn to describe the issues you’re facing in your own words. Not only is it a vital skill in coding but also, the more you say, the more we can help!

You should have three ‘marker’ div elements nested inside the ‘container’ div. Here’s an example of how you could nest three similar elements inside another:

<div class="example">
  <p>Here is some text</p>
  <p>Here is a bit more text</p>
  <p>...and a little bit more...</p>
</div>

Note that each of the nested items are separately nested within the outer div.

Got the same problem it says
“Your new div class need to have a opening tag”

@Jiangchad If you have an issue with your code, it’s best to create your own topic for it to avoid confusion. Please click on the Help icon, which appears after you have submitted incorrect code three times. This will create a forum post which includes your full code, a direct link to the challenge and an opportunity to describe your issue in your own words.

I tried to find out why I could not perfectly place the div tag. But something is wrong.

You have a line of closing div tags in the middle of your code…
Inside your ‘container’ element you should have three separate div elements, each with an opening div tag followed immediately by a closing div tag (similar to the example which I gave you).

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