How to add class one to the first div with class marker

Tell us what’s happening:
Describe your issue in detail here.
how to add class one to the first div with class marker

  **<div class="marker">**
/* file: index.html */
<!DOCTYPE html>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Colored Markers</title>
  <link rel="stylesheet" type="text/css" href="styles.css">
  <h1>CSS Color Markers</h1>
  <div class="container">
    <div class="marker0ne">
    <div class="marker">
    <div class="marker">
/* file: styles.css */
h1 {
text-align: center;

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

  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0

Challenge: Step 16

Link to the challenge:

1 Like

Hi @achiemeke and welcom

Your class syntax is wrong and also your english spelling. That is the problem with your code. You need to train your eye going slowly over the intructions, code and error messages. You will be better eventually.

You can check selectors syntax here, for example:

I use to copy and paste links and text they give me just in case. English is not my first languages and also it is a good way to avoid typos.
I hope that helps you. Happy coding!

1 Like

Hi, I am not totally sure of your problem, but if I understand correctly, you need to add an additional class to an element which already has a class. If so, you were almost right but you need to leave a space between the classes.

<div class="marker one">

1 Like

the element can have multiple classes, but we need to put space between the classes to separate them.

for example

This span have 1 class "class1class2"
<span class="class1class2"></span>
This span have 2 classes "class1 class2"
<span class="class1 class2"></span>
1 Like

Thanks! Although i was able to overcome the problem that day. All i needed was to add space between the marker and one. Thanks guys for your help.

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