1

I am trying to validate a css file. Every one of my media queries is getting a parse error.

I have checked and I do not have any missing curly brackets, colons, or semi-colons.

I also set the W3C Validator to validate CSS 3.

Below is a sample of a media query that is getting a parse error:

@media and (min-width: 600px){
    h1.page-titles{
        font-size: 3.5em;
        margin-top: 25px;
        }
    }

What can be the problem?

  • Also tried without the and in the first line, as well as adding a semi-colon after 600px. All give parse errors. – as_whitley Apr 6 '16 at 14:43
0

Here is a working example code from my own CSS.

@media screen and (max-width: 750px) {

.cont-left{
    width: 85%;
}

}

You will notice the addition of the term screen.

  • @as_whitley I am glad I could help! I was sure it was something simple. We all miss stuff from time to time. I have seen bad code on otherwise excellent sites that are very reliable. It happens to all of us. Cheers!! – closetnoc Apr 6 '16 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.