Learn Responsive Web Design by Building a Piano - Step 27

Am I doing something wrong?

  **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" />
  <link rel="stylesheet" href="./styles.css">
</head>
<body>
  <div id="piano">
    <img class="logo" src="https://cdn.freecodecamp.org/platform/universal/fcc_primary.svg" alt="freeCodeCamp Logo" />
    <div class="keys">
      <div class="key"></div>
      <div class="key black--key"></div>
      <div class="key black--key"></div>
      <div class="key"></div>
      <div class="key black--key"></div>
      <div class="key black--key"></div>
      <div class="key black--key"></div>

      <div class="key"></div>
      <div class="key black--key"></div>
      <div class="key black--key"></div>
      <div class="key"></div>
      <div class="key black--key"></div>
      <div class="key black--key"></div>
      <div class="key black--key"></div>

      <div class="key"></div>
      <div class="key black--key"></div>
      <div class="key black--key"></div>
      <div class="key"></div>
      <div class="key black--key"></div>
      <div class="key black--key"></div>
      <div class="key black--key"></div>
    </div>
  </div>
</body>
</html>
/* file: styles.css */
html {
box-sizing: border-box;
}

*, *::before, *::after {
box-sizing: inherit;
}

#piano {
background-color: #00471b;
width: 992px;
height: 290px;
margin: 80px auto;
padding: 90px 20px 0 20px;
position: relative;
border-radius: 10px;
}

.keys {
background-color: #040404;
width: 949px;
height: 180px;
padding-left: 2px;
}

.key {
background-color: #ffffff;
position: relative;
width: 41px;
height: 175px;
margin: 2px;
float: left;
border-radius: 0 0 3px 3px;
}

.key.black--key::after {
background-color: #1d1e22;
content: "";
position: absolute;
left: -18px;
width: 32px;
height: 100px;
border-radius: 0 0 3px 3px;
}

.logo {
width: 200px;
position: absolute;
top: 23px;
}

@media{
max-width: 768px;
}
  **Your browser information:**

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

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

Link to the challenge:

Hello there.

Do you have a question?

If so, please edit your post to include it in the Tell us what’s happening section.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more information you give us, the more likely we are to be able to help.

Am I doing something wrong here?

Yes

More detailed questions help us give more detailed answers. Did you mean “how do I create a media query”? What have you researched? I like MDN.

Using media queries - CSS: Cascading Style Sheets | MDN

media querie w3schools

Ok, thanks for the assist.

2 Likes

Hi! try to get out the content of the {}. And give it parentesis !!
I hope that help you!

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

Sorry! my bad, you have reason.
I think you are a bot! for the fast speed about you delete my answer :rofl:

Is this answer okay with you? That does not help at all the person who took the trouble to make the post.
Discouraging the person to move forward as next time they may not post at all as they don’t take it seriously.

They were provided two different documentation resources to help them with the media query syntax.

If you want to post syntax examples make sure it isn’t solution code, but some modified code that doesn’t spoil the answer to the challenge.

Hello! I was definitely wrong in give him the solution, it was my first reply to a post, I accepted my mistake, but even with the resources that were provided in the answer it does not mean that it will help you, since for example the examples of that link didn’t helpfull. Sorry for my bad english, i speak spanish.

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