W3C home > Mailing lists > Public > www-validator-css@w3.org > January 2007

Re: Lexical error at line 158, column 27. Encountered: " " (32), after : "#"

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Sat, 27 Jan 2007 15:26:38 +0200 (EET)
To: Ron J Roy <royrj@telus.net>
cc: www-validator-css@w3.org
Message-ID: <Pine.GSO.4.64.0701271519220.345@mustatilhi.cs.tut.fi>

On Sat, 27 Jan 2007, Ron J Roy wrote:

> Is amyone able to help me validate css that the xhtml has been validated? I
> keep getting this same error showing up at different locations.

Please stop posting bulky snippets of code and post a URL instead.
Preferably post the URL of the HTML document so that we have better 
chances of understanding your purposes in the CSS code.

Fix the errors that have been reported by the CSS Validator and explained 
by people in this list. You have similar errors throughout your CSS code. 
Fix them all.

You have constructs like

div # masthead

which are malformed: "#" cannot appear alone in a selector but only as
followed by an identifier. You need to decide whether you mean


(the div element with id="masthead") or

div #masthead

(the element with id="masthead" that appears within a div element).
Probably the former. You can actually simplify it to just


(the element with id="masthead").

> class . id1

Similar considerations apply here. The "." must not appear alone. The 
identifier "class" is technically correct but refers to an _element_ with 
that name (<class ...>...</class>), which cannot appear in HTML. So most 
probably you just meant


(which matches any element whose class attribute contains "id1").

Received on Saturday, 27 January 2007 13:26:50 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:40:43 UTC