Support » Fixing WordPress » Parser Error

  • Hello, thanks for reading and for any help you may be able to give. I have been doing quite a lot of work on my theme lately and would now like to validate it.
    The URI validates as XHTML transitional no problem, the style CSS validates as a text file using the the text file update – appart from the warnings OK…
    BUT… When i try and validate the CSS using the URI i get the following.
    Error Line 18 Parse error – Unrecognized : }

    Now in the the CSS on line 18 i can find nothing of any importance, i checked other files like the index.php and the header.php but either i’m lind or i can’t see anything.
    Grateful for any help. Best wishes Neil

    Here is the URL

Viewing 4 replies - 1 through 4 (of 4 total)
  • you should be closing ALL your CSS calls, no matter if they are end of the block or not.
    EG on this line:

    #current {
    BORDER-RIGHT: #a09f9f 1px solid;
    BACKGROUND: #ccced2;
    BORDER-LEFT: #a09f9f 1px solid;
    BORDER-BOTTOM: #a09f9f 1px solid <<<wheres the semi colon?
    Its the same for all your css start closing them and see what happens

    Thanks for the tip, but i don’t think this has anything to do with it. In fact i read today, from a highly acclaimed CSS source, that exactly that, which you suggest, is not required ie only when you have have more than one does the one before last need to be closed. At first i had them all closed and then read this— so this (the couple of instances you’ve found) was an attempt to rectify it. The CSS text will still validate on it’s own irrespective if the semi- colon is there where you suggest or not. The } closes the last one –
    But many thanks for your help and your time. Best wishes Neil

    Actually, there a ‘useless’ } in your header.php where the stylesheet is called.

    Thanks Moshu, that was it. I must have spent hours looking over this code and always overlooked this. You know how it is when you’ve been changing things everywhere. What i found confusing is the validator for the html says in which line the mistake is and its easy to find it. The CSS validator seems to work differently. Anyway thanks a million and best wishes from Switzerland – Neil


Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Parser Error’ is closed to new replies.