Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > CSS > CSS Cascading Style Sheets
|
CSS Cascading Style Sheets All issues relating to Cascading Style Sheets (CSS).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the CSS Cascading Style Sheets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 23rd, 2006, 06:19 AM
Registered User
 
Join Date: Nov 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Parser Error w/ REALLY Basic CSS

I'm starting a CSS for a beginning web project and was given the following error message when trying to validate with the W3C CSS Validator:

Errors
URI : file://localhost/styles.css

    * Line: 14 Context : #65533;#65533;#65533;

      Parse Error - #navcontainer { width: 160px; }

Here is the source from my CSS:

/* Define Nav Container */

#navcontainer
    {
    width: 160px;
    }

#navcontainer ul
    {
    margin-left: 0;
    padding-left: 0;
    list-style-type: none;
    font-family: arial, helvetica, sans-serif;
    }

#navcontainer a
    {
    display: block;
    padding: 3px;
    width: 160px;
    background-color: #000033;
    color: #FFFFFF;
    border-bottom: 1px solid #EEEEEE;
    }

#navcontainer a:link, #navlist a:visited
    {
    background-color: #000033;
    color: #EEEEEE;
    text-decoration: none;
    }

#navcontainer a:hover
    {
    background-color: #336699;
    color: #EEEEEE;
    }

#navcontainer a:active
    {
    background-color: #99CCFF;
    color: #000033;
    }

/* End Define Nav Container */


If anyone can help, I'd be most grateful. I'm just starting out and this seems like a weird hangup. Also, if you see any other glaring problems, please let me know. Thank you in advance for your help.
 
Old November 23rd, 2006, 06:31 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

The code you posted doesn't have any errors.
http://jigsaw.w3.org/css-validator/v...usermedium=all



Quote:
quote:Line: 14 Context : #65533;#65533;#65533;
It doesn't contain those values either. If you have that somewhere the numbers should probably consist of 6 digits each and there shouldn't be semicolons between them.

Could you post a link to the CSS file?


--
http://yupapa.com
 
Old November 24th, 2006, 08:21 PM
Registered User
 
Join Date: Nov 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Meow,
Thank you for your reply. The website is not live yet; it's still on my local drive. I just tried the W3C CSS Validator again just now and, even though it's still giving me the same message:

W3C CSS Validator Results for file://localhost/styles.css

To work as intended, your CSS style sheet needs a correct document parse tree. This means you should use valid HTML.
Errors
URI : file://localhost/styles.css

    * Line: 14 Context : #65533;#65533;#65533;

      Parse Error - #navcontainer { width: 160px; }

Valid CSS information

    * #navcontainer ul {
          o margin-left : 0;
          o padding-left : 0;
          o list-style-type : none;
          o font-family : arial, helvetica, sans-serif;
      }
    * #navcontainer a {
          o display : block;
          o padding : 3px;
          o width : 160px;
          o background-color : #000033;
          o color : #ffffff;
          o border-bottom : 1px solid #eeeeee;
      }
    * #navcontainer a:link, #navlist a:visited {
          o background-color : #000033;
          o color : #eeeeee;
          o text-decoration : none;
      }
    * #navcontainer a:hover {
          o background-color : #336699;
          o color : #eeeeee;
      }
    * #navcontainer a:active {
          o background-color : #99ccff;
          o color : #000033;
      }

It's weird because this is the same code that returned as no error when you tried (the result you sent me the link to. Same code.)
I must be missing something strange and obvious. And after the "Line 14: Context :" there are three black diamonds with question marks on them at the W3C site. That's where those weird numbers at the top that are not hexadecimals is coming from.

Thank you again for your response.


 
Old November 25th, 2006, 02:39 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

 
Quote:
quote:The website is not live yet; it's still on my local drive.

Obviously you have an internet connection, so what stops you from uploading the CSS file to a server where we can get to it? ;)
Quote:
quote:there are three black diamonds with question marks on them at the W3C site
Sounds like you have illegal characters in there.

Since you don't want to show your stuff I'm afraid that's all the help I can give you.

--
http://yupapa.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Very Basic Question on Spacing with CSS guynorton CSS Cascading Style Sheets 4 December 14th, 2006 04:33 PM
Parser Error rwalker Crystal Reports 0 May 8th, 2006 03:47 PM
Parser Error shupiR ASP.NET 1.0 and 1.1 Basics 4 January 6th, 2006 12:59 AM
Parser Error ashokparchuri General .NET 0 June 3rd, 2005 03:14 AM
Parser Error on Biztalk mandla Access 0 August 13th, 2003 07:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.