Learn Responsive Web Design by Building a Piano - Step 6

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" />
  <title>Piano</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
  <div id="piano">
    <div class="keys">
      <div class="key"></div>
      <div class="key" class="black--key"></div>
      <div class="key" class="black--key"></div>
      <div class="key"></div>
      <div class="key" class="black--key"></div>
      <div class="key" class="black--key"></div>
      <div class="key" class="black--key"></div>
    </div>
  </div>
</body>
</html>
/* file: styles.css */

  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36

Challenge: Learn Responsive Web Design by Building a Piano - Step 6

Link to the challenge:

Please, I am stuck. i tried adding a class to existing class but it is not passing

1 Like

Inorder to add class to an existing class, You just need to add space before typing the existing class. eg

class=“glory”
if i want to add another class currency to the class then it would be

class=“glory currency”

hope this helps

4 Likes

do not add the new class by duplicating the attribute “class”
In HTML the attributes can only be specified once per element.
So this method below is wrong:
<div class="one" class="two" class="three"></div>

However this version is not:
<div class="one two three"></div>

1 Like

thanks a lot. I am sorted out

1 Like