CSS CSS Basics Enhancing the Design With CSS Gradients

Robert Rydlewski
Robert Rydlewski
1,675 Points

why this code doesn't work ??

style.css
/* Complete the challenge by writing CSS below */
.main-header {
  background-image: linear-gradient(to top  steelblue, darkslateblue 90%);
}
index.html
<!DOCTYPE html>
<html>
  <head>
    <title>Lake Tahoe</title>
    <link rel="stylesheet" href="page.css">
    <link rel="stylesheet" href="style.css">
  </head>
  <body> 
    <header id="top" class="main-header">
      <span class="title">Journey Through the Sierra Nevada Mountains</span>
      <h1 class="main-heading">Lake Tahoe, California</h1>
    </header>

        <div class="primary-content">
            <p class="intro">
                Lake Tahoe is one of the most breathtaking attractions located in California. It's home to a number of ski resorts, summer outdoor recreation, and tourist attractions. Snow and skiing are a significant part of the area's reputation.
            </p>
            <a class="callout" href="#more">Find out more</a>
        </div><!-- End .primary-content -->
  </body>
</html>

1 Answer

rydavim
rydavim
15,321 Points

Looks like you're just missing a comma between your direction and your first color stop.

.main-header {
  /* comma after to top below */
  background-image: linear-gradient(to top, steelblue, darkslateblue 90%); 
}

Keep up the good work!