Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Seth Goldberger
Seth Goldberger
2,340 Points

CSS parse error please help

Here is my code...error is W3C CSS Validator results for TextArea (CSS level 3) Sorry! We found the following errors (1) URI : TextArea 76 Parse Error @media screen and (min-width: 660px) { /******************** HEADER *********************/ nav { background: none; float: right; font-size: 1.125em; margin-right: 5%; text-align: right; width: 45% } #Logo { float: left; margin-left: 5%; text-align: left; width: 45% } h1 { font-size:2.5em; } h2 { font-size: 0.825em; margin-bottom: 20px; } header { border-bottom: 5px solid #599a68; margin-bottom: 60px; } }

here is full code:

@media screen and (min-width: 480px) {


      /********************
    TWO COLUMN LAYOUT
    *********************/
  #primary {
    width: 50%;
    float: left
  }

  #secondary{
    width: 40%;
    float: right;
  }


        /********************
        PAGE PORTFOLIO
        *********************/

  #gallery li {
    width:28.3333%
  }

  #gallery li:nth-child(4n) {
    clear: left;
  }

       /********************
        ABOUT
       *********************/

  .profile-photo {
    float: left;
    margin: 0 5% 80px 0;
  }

@media screen and (min-width: 660px) {


    /********************
        HEADER
     *********************/

    nav {
      background: none;
      float: right;
      font-size: 1.125em;
      margin-right: 5%;
      text-align: right;
      width: 45% 
    }

    #Logo {
      float: left;
      margin-left: 5%;
      text-align: left;
      width: 45%
    }

    h1 {
      font-size:2.5em;
    }

    h2 {
      font-size: 0.825em;
      margin-bottom: 20px;
    }

    header {
      border-bottom: 5px solid #599a68;
      margin-bottom: 60px;
    }

  }

2 Answers

You have semicolons missing from your width properties in both the nav and logo rules, I think that's why you're getting this error.

Seth Goldberger
Seth Goldberger
2,340 Points

I appreciate the help Justin but that did not work I tried that before. Any other ideas?? It all looks correct to me

Hi Seth. I dropped your CSS code in my text editor to have a more serious look at it, I found a few more issues.

  1. Missing semicolon inside #primary rule on float property.
  2. Missing semicolon inside #gallery li rule on width property.
  3. The biggest issue, the reason your css isn't passing validation: no closing curly brace for your @media screen and (min-width: 480px) { } rule.

I ran the CSS through the validator myself after making these corrections and it passed with no errors. Watch out for those missing closing braces, they'll mess you up pretty bad! Hope this helps.