CSS CSS Basics Understanding Values and Units Pixels and Percentages

Luci Peterson
seal-mask
.a{fill-rule:evenodd;}techdegree
Luci Peterson
Full Stack JavaScript Techdegree Student 12,005 Points

It says i don't have a closing curly bracket but i do have one?

On third step, it says make width of main content 75% of page, I did that within two curly brackets but when I click check work it says I am missing one.

style.css
/* Complete the challenge by writing CSS below */

.title {
  font-size: 26px;
}

h2 {
  font-size: 53px
}

.main-content {
  width: 75%
}
index.html
<!DOCTYPE html>
<html>
  <head>
    <title>Lake Tahoe</title>
    <link rel="stylesheet" href="page.css">
    <link rel="stylesheet" href="style.css">
  </head>
  <body>
    <div class="container">
      <header>
        <span class="title">Journey through the Sierra Nevada Mountains</span>
        <h1>Lake Tahoe, California</h1>
      </header>
      <div class="main-content">
        <p>
          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 href="#">Find out more</a>
        <h2>Check out all the Wildlife</h2>
        <p>
          As spawning season approaches, the fish acquire a humpback and protuberant jaw. After spawning, they die and their carcasses provide a feast for gatherings of mink, bears, and Bald eagles.
        </p>
        <a href="#">See the Wildlife</a>
      </div>
    </div>
  </body>
</html>

2 Answers

It should say don't forget your semicolons

Eric Butler
Eric Butler
33,476 Points

Important side-note: while the answer-evaluator dinged you for missing semicolons, you should know semicolons are NOT required on a rule's last declaration in a real CSS file. What you have is perfectly valid CSS.

.anything {
  margin: 1em 0;
  font-family: sans-serif;
  font-size: 16px
}
.whatever {
  text-transform: uppercase
}

Both of those semicolon omissions are totally fine, and if you ever minify your CSS, the minifier WILL remove them even if you wrote them there to begin with.

That said, it is A NICE HABIT to be in to always close every declaration with a semicolon, so that you can be free to add declarations after it and generally just be consistent in your coding.

Shanay Murdock
Shanay Murdock
Full Stack JavaScript Techdegree Student 1,048 Points

Your .h2 and .main-content selectors are both missing semi-colons, so that is likely where the problem is occurring.