Thread: Strange Error

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2009
    Posts
    3
    Rep Power
    0

    Question 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 : "<!"
    My CSS is valid, as I keep it really simple, but from a quick Google search, it would seem that w3c CSS validation is attempting to validate my XHTML before my CSS?
    Does anyone have any suggestions (aside from pasting the CSS directly into the validation page)?
    Here is my CSS:
    Code:
    body {
    background : #003 url(images/bground.png) repeat-x;
    color : #fff;
    font-family : Arial, Helvetica, Georgia, Sans-serif;
    font-size : 11px;
    margin : 0;
    padding : 0;
    text-align : center;
    }
    a {
    color : #66f;
    text-decoration : none;
    }
    p {
    line-height : 14px;
    margin : 0;
    padding : 0 0 8px 0;
    }
    h1 {
    background : url(images/h1-logo.png) no-repeat;
    color : #300;
    font-family : Arial, Helvetica, Georgia, Sans-serif;
    font-size : 48px;
    height : 48px;
    margin : 0;
    padding : 0 0 0 56px;
    }
    #index-header {
    height : 48px;
    margin : 0;
    padding : 24px;
    text-align : left;
    }
    #index-header h1 a, #index-header a {
    color : #300;
    text-decoration : none;
    }
    .hdr1 {
    float : left;
    }
    .hdr2 {
    float : right;
    }
    .hdr2 ul {
    font-size : 12px;
    font-weight : bold;
    list-style : none;
    }
    #navigation {
    background : url(images/navbar.png) repeat-x;
    height : 32px;
    }
    .nb {
    float : left;
    }
    .nb2 {
    float : right;
    }
    ul#navbar {
    height : 16px;
    margin : 0 12px;
    padding : 0;
    }
    ul#navbar li {
    float : left;
    font-size : 13px;
    font-weight : bold;
    line-height : 16px;
    list-style : none;
    margin : 0;
    padding : 8px;
    }
    ul#navbar li a {
    color : #333;
    text-decoration : none;
    }
    form#searchform {
    float : right;
    margin : 0;
    padding : 6px;
    }
    form#searchform #s {
    background : inherit;
    border : 1px solid #333;
    }
    form#searchform #searchsubmit {
    background : inherit;
    border : 0;
    color : #333;
    font-family : Arial, Helvetica, Georgia, Sans-serif;
    font-size : 13px;
    font-weight : bold;
    }
    #index-wrapper {
    border : none;
    margin : 0;
    padding : 12px;
    width : 100%;
    vertical-align : top;
    }
    #slideshow {
    background : url(images/Natural-Wonders.gif) no-repeat;
    height : 300px;
    width : 400px;
    }
    #recentposts {
    padding : 0 0 0 12px;
    text-align : justify;
    width : auto;
    vertical-align : top;
    }
    .index-post {
    background : #306 url(images/post-h2.png) repeat-x;
    margin : 0 0 12px 0;
    padding : 6px;
    }
    .index-post h2, .index-post h2 a {
    border-bottom : 1px solid #666;
    color : #fff;
    font-size : 16px;
    font-weight : bold;
    margin : 0 0 4px 0;
    padding : 0;
    text-decoration : none;
    }
    .postmetadata {
    border-top : 1px solid #666;
    color : #666;
    font-size : 10px;
    }
    .tags {
    margin : 0;
    padding : 0;
    vertical-align : top;
    width : 400px;
    }
    #footer {
    border-top : 1px solid #666;
    margin : 12px 0;
    padding : 12px 0 0 0;
    }
    #footer a {
    color : #999;
    text-decoration : none;
    }
    And just for good measure, here's the portion of the <head> tag that it is referring to:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head profile="http://gmpg.org/xfn/11">
  2. #2
  3. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,131
    Rep Power
    4304
    Welcome to DevShed Forums, creedalene.

    When I've seen that error before it was caused by a missing stylesheet (which generates a 404 error page which contains a doctype which is what the error message refers to). So make sure that all of the <link>s and @imports you're using are correct.
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2009
    Posts
    3
    Rep Power
    0
    Originally Posted by Kravvitz
    Welcome to DevShed Forums, creedalene.

    When I've seen that error before it was caused by a missing stylesheet (which generates a 404 error page which contains a doctype which is what the error message refers to). So make sure that all of the <link>s and @imports you're using are correct.
    This is the generic link used by wordpress... it doesn't seem any different that what I've used before but maybe a fresh pair of eyes will see something I've missed:

    Code:
    <head profile="http://gmpg.org/xfn/11">
    
    <title>Dalene Design</title>
    
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="generator" content="WordPress 2.9" />
    <!-- leave this for stats please -->
    
        <link rel="stylesheet" href="http://www.dalenedesign.com/wp-content/themes/adventure/style.css" type="text/css" media="screen" />
        <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://www.dalenedesign.com/?feed=rss2" />
        <link rel="alternate" type="text/xml" title="RSS .92" href="http://www.dalenedesign.com/?feed=rss" />
    
        <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="http://www.dalenedesign.com/?feed=atom"/>
        <link rel="pingback" href="http://www.dalenedesign.com/xmlrpc.php" />
    
    	<link rel='archives' title='December 2009' href='http://www.dalenedesign.com/?m=200912' />
    	<link rel='archives' title='November 2009' href='http://www.dalenedesign.com/?m=200911' />
    <link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.dalenedesign.com/xmlrpc.php?rsd" />
    <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://www.dalenedesign.com/wp-includes/wlwmanifest.xml" /> 
    <link rel='index' title='Dalene Design' href='http://www.dalenedesign.com' />
    <meta name="generator" content="WordPress 2.9" />
    <link href="style.css" rel="stylesheet" type="text/css" />
    </head>
  6. #4
  7. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,131
    Rep Power
    4304
    It looks like the last <link> is the culprit (I'm assuming it's pointing to http://www.dalenedesign.com/style.css), so remove it.
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2009
    Posts
    3
    Rep Power
    0

    Smile Accomplished


    It never ceases to be amazing what we miss when we're tired... thank you, I put that there to point to the CSS sheet while I was editing, so that I wouldn't have to keep uploading while I was editing... I deleted the extra CSS when I finished, but not the link. Thank you for pointing that out.
  10. #6
  11. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,131
    Rep Power
    4304
    You're welcome. It often helps to have a second pair of eyes look at a problem.
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).

IMN logo majestic logo threadwatch logo seochat tools logo