The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS CSS Validation

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #174284

    Why won’t this CSS validate?

    <link rel='stylesheet' media='screen and (max-width: 1200px)' href="css/1024main.css">


    I should have worded my question better. What is happening is these show up as errors when I do a “Validate CSS”.

    However they show up as being in a css file that does not contain any code like this.

    The actual error is “unrecognized media screen and (max-width: 1024x)”

    I would post a link to the website, but I had to sign a non-disclosure agreement with my client before they would give me the order to design this website.

    I guess I will just keep playing with this website and see if I can figure it out.


    The actual error is “unrecognized media screen and (max-width: 1024x)”

    If that is actually the actual error, then it’s because you missed a “p” after “1024” (should be 1024px instead of 1024x)

    Perhaps you’re not validating the right thing. You should validate the contents of the file 1024main.css, not the line <link rel=’stylesheet’ media=’screen and (max-width: 1200px)’ href=”css/1024main.css”> (if that makes sense).


    Sorry about the “p”. That was my mistake in writing the above post.

    I did a “Validate CSS” on the main website URL. This is what I have always done in the past, and what it has done before is to find all the css files associated with main website page and validate the code within those files.

    In fact when I did the validate css on the main website URL it is telling me the error is inside one of the css files associated with the home page of this website. However, the code that it is calling an error is not located on the css file it is referring to. It is actually located in the html file.

    All this is very strange.


    I’m sorry, I can’t picture this being a child of a style element. Is there ever a case where this would be used?

    As far as I know, there are six of this types of code in the header of the Home page of this website, and no where else. I should also note that the website displays as intended without any bugs, at least that I can see.

    This website is not the cleanest website I have ever designed. I have designed it to work on different resolutions in a number of ways, at my clients request.

    I believe I have cleaned it up so now I just have a basic html web page and have it styled differently for different size monitors.

    This is the way the client ended up wanted it designed because of the type of content they have to display.

    This particular client is very picky about the exact positioning of every element on the page. They did not like things changing size and shifting position as it did with other responsive designs.


    OK, I found the problem, and it is not in my code.

    All this time I have been using the Web Developer 1.2.5 add-on for the Firefox browser. There is a drop-down menu with a “Validate CSS” button. Apparently there is something wrong with this validation service even though it appears to take me to the same W3C page. I have never had a problem with this before today.

    I just went directly to the W3C CSS Validation page and ran the test which come back with the message “Congratulations! No Error Found”.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘CSS’ is closed to new topics and replies.