Create a Gradual CSS Linear Gradient Keep Getting Error

Create a Gradual CSS Linear Gradient Keep Getting Error
0

#1

Tell us what’s happening:

I keep getting error with completion of this task/instruction :
“The div element should have a linear-gradient background with the specified direction and colors.”
Even though it displays fine

Your code so far


<style>

  div{ 
    border-radius: 20px;
    width: 70%;
    height: 400px;
    margin: 50px auto;
    background: linear-gradient(35deg, #CCFFFF , #FFCCCC);
  }

</style>

<div></div>

Your browser information:

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

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/applied-visual-design/create-a-gradual-css-linear-gradient


#2

Remove the space after #CCFFFF, or better remove all the spaces you have inside the linear-gradient()


#3

Thanks, that worked.
In the example given in explanation, it uses spaces.


#4

Yep, using space makes the code look cleaner, but the trouble comes when we add unwanted spaces without knowing it.


#5

I’m on the same problem, I’ve got rid of the spaces and it still isn’t working…

div{ border-radius: 20px; width: 70%; height: 400px; margin: 50px auto; background: linear-gradient(35deg,#CCFFFF,#FFCCCC) }

???


#6

You missed semi-colon


#7

Oh dear, it appears I have. Bit of a brainfart, thanks lol