Learn More About CSS Pseudo Selectors By Building A Balance Sheet - Step 60

Tell us what’s happening:
i pass the step alright, and may be it will be explained later on, why things are done in this way.

in this step, we are suppose to change the background of the class data by having

background: linear-gradient(to bottom, #dfdfe2 1.845rem, white 1.845rem)

,my question here is: what is the difference between setting the linear gradient to just background-color: #dfdfe2

Your code so far


The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

Replace these two sentences with your copied code.
Please leave the ``` line above and the ``` line below,
because they allow your code to properly format in the post.

Your browser information:

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

Challenge: Learn More About CSS Pseudo Selectors By Building A Balance Sheet - Step 60

Link to the challenge:

use the background-image: and attach the linear-gradient () properties there please for this to work

I didn’t understand the question. Are you asking why didn’t they just say to write background: linear-gradient(#dfdfe2);??

Edit: on rereading I think you meant why did they use this background property at all? You think that it is equivalent to setting a single color to the background-color property?

Are you asking because you cannot see a visual difference between the gradient as it is set at the moment?

I guess you asked why using linear-gradient when there is a simpler option, right?

Well, the results are different! Try to experiment with the codes before submitting: change the parameters to see how it works, put one or two more codes, or use different ways… I find it helps me undertand how things work better.

Or you can google it, like: css linear-gradient.

Btw, linear-gradient feature is introduced in an earlier challenge/lesson: Learn CSS Colors by Building a Set of Colored Markers.

Ah, I’ve just completed the step and got what you meant!

The gradient is very mild, between gray and white, it’s barely seen. Between red and blue, it would be more visible! :laughing:

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