Parse Error Lexical Error At Line 1
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with lexical error encountered us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow css validator Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up html validator CSS3 Parse Error Lexical error up vote 0 down vote favorite I keep getting this error and am not sure why it pops up when I validate it. Can anyone explain this to me and how to fix it? The error is this: 246 #copyright Parse Error Lexical error at line 249, column 2. Encountered: " " (32), after : "@" Here is the code. I am starting with line 246, which I guess where it starts...not really understanding what is going on here. Line 246 is the closing bracket for my smartphone css. I can post that also if you need it. Much appreciated. } /* ----- Tablet ----- */ @ media screen (min-width: 481px) and (max-width: 769px) { div#wrapper{ margin: 0 auto; padding: 1em; width: 98%; } header h1 { font-size: 1.8em; } } css css3 validation parse-error share|improve this question edited Jun 23 '14 at 5:26 BoltClock♦ 385k959371048 asked Jun 23 '14 at 5:15 floyd 61118 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote accepted The error message is saying that the parser encountered a space " " after the "@" following line 246. The space is not supposed to be there, hence the parse error; you need to remove it. You are also missing an and from this media query. Here is the correct syntax: @media screen and (min-width: 481px) and (max-width: 769px) { share|improve this answer answered Jun 23 '14 at 5:29 BoltClock♦ 385k959371048 Thank, I am going to try this out and see if that works. –floyd Jun 23 '14 at 5:34 add a comment| up vote 1 down vote There shouldn't be any space between @ and media. It should be : @media //not @ media share|improve this answer answered Jun 23 '14 at 5:30 DareDev1l 15210 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged css css3 validation parse-error or ask your own
W3C CSS Validation Service? If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 7 of 7 Thread: What causes "Lexical error" messages using The W3C CSS Validation Service? Tweet Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 09-14-2007,11:51 AM #1 KnoxVol View http://stackoverflow.com/questions/24358777/css3-parse-error-lexical-error Profile View Forum Posts Registered User Join Date May 2007 Posts 30 What causes "Lexical error" messages using The W3C CSS Validation Service? I'm trying to validate my style sheet programming using The W3C CSS Validation Service: http://jigsaw.w3.org/css-validator/ It's giving the following error message Lexical error at line 1, column 3. Encountered: "D" (68), after : "http://www.webdeveloper.com/forum/showthread.php?160745-What-causes-quot-Lexical-error-quot-messages-using-The-W3C-CSS-Validation-Service "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Can anybody see what's causing the error? Thanks. Reply With Quote 09-14-2007,01:17 PM #2 ray326 View Profile View Forum Posts Visit Homepage Got Link? Join Date Nov 2003 Location Jerryville, Tejas Posts 11,715 That's HTML, not CSS. Is that the problem? "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan Reply With Quote 09-14-2007,01:50 PM #3 dtm32236 View Profile View Forum Posts You're a nerd. Join Date Aug 2007 Location New Jersey, US Posts 1,779 http://validator.w3.org/ that's what you want validate your CSS with a CSS validator Reply With Quote 09-15-2007,08:36 AM #4 KnoxVol View Profile View Forum Posts Registered User Join Date May 2007 Posts 30 ray326, dtm32236; Thanks for responding. I appreciate the input. What I'm trying to do is validate the CSS. I figured out what was causing the error message. I was copying and pasting all of the Html, instead of just the CSS, from the web page source code into the validator. This page says "Enter the CSS you would like validated:" http://jigsaw.w3.org/css-vvan GoogleInloggenVerborgen veldenZoeken naar groepen of berichten
Search Username Password Remember Me? Register Lost Password? facebook google twitter rss Free Web Developer Tools Advanced Search Forum Web Design CSS Help Strange Error Thread: Strange Error Share This Thread Tweet This + 1 this Post To Linkedin Subscribe to this Thread Subscribe to This Thread December 31st, 2009,10:32 AM #1 No Profile Picture creedalene View Profile View Forum Posts Visit Homepage Registered User Devshed Newbie (0 - 499 posts) Join Date Dec 2009 Posts 3 Rep Power 0 Strange Error I have been designing for a few years now, and never come across this error when I use w3c CSS validation, but when I attempted to validate my CSS for a wordpress theme I've created, I received the following error: Parse Error Lexical error at line 1, column 3. Encountered: "D" (68), after : "