• Hi, I want to insert this CSS code to change the color. When inserting, however, the error message “Expected LBRACE at line 81, col 3.” appears. Can anybody help me further?

    @media (max-width: 1100px)
    .navbar-custom .navbar-nav {
    /* background-color: #21202e; */
    float: none!important;
    margin: 0px;
    }

    many Greetings

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    That’s not valid syntax for the media query. I assume you’ve taken this from your browser? The browser doesn’t always present things in a syntactically correct way. Instead of this bit:

    
    @media (max-width: 1100px)
    

    Write this (with a left brace on the end):

    
    @media (max-width: 1100px) {
    

    And then you have to put a right brace at the end of your code:

    
    margin: 0px;
    }
    }
    

    The entire solution should be this instead:

    
    @media (max-width: 1100px) {
      .navbar-custom .navbar-nav {
        /* background-color: #21202e; */
        float: none!important;
        margin: 0px;
      }
    }
    
    
    Thread Starter philippf

    (@philippf)

    Yes, I have that from my browser, Chrome. I wanted to replace the color of the NAvbar. Unfortunately, your code does not work either. I’m starting to despair

    Thread Starter philippf

    (@philippf)

    Just finished. Have found a solution. Many thanks for your help

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    What is the solution? If you’re saying there’s a syntax error and the code that I suggested didn’t work, I would very much like to know what the solution is.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘“Expected LBRACE” Error’ is closed to new replies.