WordPress.org

Ready to get started?Download WordPress

Forums

Parser Error (5 posts)

  1. neild
    Member
    Posted 7 years ago #

    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
    http://www.lightscape-images.com/ramblings

  2. phuckd
    Member
    Posted 7 years ago #

    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

  3. neild
    Member
    Posted 7 years ago #

    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

  4. moshu
    Member
    Posted 7 years ago #

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

  5. neild
    Member
    Posted 7 years ago #

    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

    RESOLVED :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags