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

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

div#masthead

(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

#masthead

(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

.id1

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

-- 
Yucca
http://www.cs.tut.fi/~jkorpela/

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