Create a Gradual CSS Linear Gradient 2021

<style>

  div{

    border-radius: 20px;

    width: 70%;

    height: 400px;

    margin: 50px auto;

    background-image: linear-gradient(35deg, #CCFFFF, #FFCCCC);

  }

</style>

<div></div>

Hi there,

Above is my current code for this exercise, I’ve seen the posts from '18 but despite me using it with -image and without, in hex code or rgb, I can’t get it to work.

Any help would be greatly appreciated!

Thanks!

Alexis

The code you have shared works on my end. Please ensure that you have disabled any extensions that interface with the freeCodeCamp website (such as Dark Mode and Ad Blocker), and set your browser zoom level to 100%. Both of these factors can cause tests to fail erroneously.

Or try in a different browser.


I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).


The challenge:

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