Learn CSS Transforms by Building a Penguin - Step 2

Stuck on step 2.
The error says:
“You should use the background property in the body selector.”

I can’t figure out what is happening.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  
  <head>
    <meta charset="UTF-8" />
    <link rel="stylesheet" href="./styles.css" />
    <title>Penguin</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  </head>

  <body>
  </body>
</html>
/* file: styles.css */
body{
  background: linear-gradient (45deg, rgb(118, 201, 255), rgb(247, 255, 222));
}

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36

Challenge: Learn CSS Transforms by Building a Penguin - Step 2

Link to the challenge:

Do you have any extensions running in your browser like dark mode? Please disable them and check if that helps.
You can also force a refresh after you disable them by restarting the step and clicking on CTRL-F5.

try what “hbar1st” is suggesting and if its still “persisting” then try to “reverse engineer” this a bit, as in start “small” and the “build” up to what “step” is asking

for instance start with just “body {}” and see what “error” messages that you get and then “act” on it, i found it useful…

happy learning :slight_smile:

1 Like

now I see the issue (sorry before I was on my cell and couldn’t tell what was wrong).

You left a space between the word gradient and the following bracket.
As linear-gradient is a CSS function, there should be no spaces between it and the bracket holding the input values.

It is still not working.

Sorry to hear that. It would help if we could see your new code?

Hey!
Please copy/paste your code here instead of an image so its easier for others to help you.

Thanks.

Never Mind, i got the solution.
I was missing a COMMA between 45deg and First rgb value.

1 Like

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