Learn CSS Transforms by Building a Penguin - Step 2

Tell us what’s happening:

body {
background: linear-gradient(
45deg,
rgb(118, 201, 255) 0%,
rgb(247, 255, 222) 100%,
);
}

So I input that code in Step 2 of building a happy Flappy penguin project on Html.

The prompt: Target the body element to set the background to a linear gradient angled 45 degrees clockwise, starting at rgb(118, 201, 255) and ending at rgb(247, 255, 222).

But I continue to get an error that says,”You should use the background property in the body selector.” I really don’t know what

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 */

/* User Editable Region */

body {
  background: linear-gradient(
    45deg,
    rgb(118, 201, 255) 0%,
    rgb(247, 255, 222) 100%,
  );
}

/* User Editable Region */

Your browser information:

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

Challenge Information:

Learn CSS Transforms by Building a Penguin - Step 2

try removing the comma after 100%. As such;

body {
background: linear-gradient(
45deg,
rgb(118, 201, 255) 0%,
rgb(247, 255, 222) 100%
);

3 Likes

Thanks I also realized that I didn’t need the semicolon at the end, I guess I am dumb. :joy:

I am sure you have solved this by now, but just in case you haven’t, the code did not work for me until i removed the 0% and 100%.