Need some help with CSS

I am a part of Responsive Web Designing Bootcamp. Currently solving problems in [Learn CSS Colors by Building a Set of Colored Markers] and i am stuck at Step 78.

Step #78 asks me to Create a new rule to target both the cap and sleeve classes, and set display to inline-block .

I tried to solve the best way possible as per my understanding.

To my understanding there are two approach.
Either I can write

.cap{
  width: 60px;
  height: 25px;
  display: inline-block;
}

.sleeve{
  width: 110px;
  height: 25px;
  background-color: rgba(255, 255, 255, 0.5);
  display: inline-block;
}

or I can just add this way

.cap.sleeve{
 display: inline-block;
}

But, seems both approaches seems to be wrong as it is giving me error. and Hint is not helping me either.

maybe you need to leave space between the two classes, so the rule does not apply to an element which has both classes, but to any element having either of them:

.cap, .sleeve{
 display: inline-block;
}

Programming challenges can sound quite ambiguous sometimes, or require you to do things in very specific order

edit: corrected syntax

1 Like

for either of them, you need to separate with a comma

2 Likes

Hey, thank you all. You have been a great help. The code worked.

1 Like

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