<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
   <channel>
    <atom:link href="http://autonomouse.webnode.com/rss/all.xml" rel="self" type="application/rss+xml" />
      <title>All articles - autonomouse.webnode.com</title>
      <link>http://autonomouse.webnode.com/archive/news/</link>
      <description></description>
      <language>en</language>
      <pubDate>Sat, 15 Mar 2008 09:50:00 +0100</pubDate>
      <lastBuildDate>Sat, 15 Mar 2008 09:50:00 +0100</lastBuildDate>
      <category>Blog</category>
      <docs>http://blogs.law.harvard.edu/tech/rss</docs>
      <generator>Rubicus v2.0</generator>
      <managingEditor>autonomouse@live.co.uk (autonomouse@live.co.uk)</managingEditor>
      <webMaster>autonomouse@live.co.uk (autonomouse@live.co.uk)</webMaster>
      <item>
         <title>How To Avoid the W3C 'Invalid CSS' message</title>
         <link>http://autonomouse.webnode.com/news/first-blog/</link>
         <description><![CDATA[Have you ever got that new design online, then decided that you want some accreditation, or having that W3C Valid CSS and XHTML document buttons at the bottom of the page.
So you head over to The W3C Markup Validation Service and The W3C CSS Validation Service.
As always, there's a couple of errors, but you can easily fix them...
Then you have the CSS, which is always hard to fix.
There are a couple of ways to fix this:

    You move the invalid CSS to a CSS file that contains all of the errors...<br />
RSS feed by Autonomouse. You can view the whole site at http://autonomouse.co.nr]]></description>
         <pubDate>Sat, 15 Mar 2008 09:50:00 +0100</pubDate>
         <guid isPermaLink="true">http://autonomouse.webnode.com/news/first-blog/</guid>
         <category>Blog</category>
         <content:encoded><![CDATA[<p>Have you ever got that new design online, then decided that you want some accreditation, or having that W3C Valid CSS and XHTML document buttons at the bottom of the page.</p>
<p>So you head over to <a href="http://validator.w3.org/#validate_by_upload">The W3C Markup Validation Service</a> and <a href="http://jigsaw.w3.org/css-validator/">The W3C CSS Validation Service</a>.</p>
<p>As always, there's a couple of errors, but you can easily fix them...</p>
<p>Then you have the CSS, which is always hard to fix.</p>
<p>There are a couple of ways to fix this:</p>
<ol>
    <li>You move the invalid CSS to a CSS file that contains all of the errors in one document.&#160;</li>
    <li>You use Javascript hacks, image hacks and so on.</li>
</ol>
<p>So, I'll just show you the first one.</p>
<h3>You move the invalid CSS to a CSS file that contains all of the errors in one document.</h3>
<p>This is really easy, all you have to do is go to the <a href="http://jigsaw.w3.org/css-validator/">The W3C CSS Validation</a> page, and copy and paste the lines it tells you to that are invalid.</p>
<p>Example (from an up-and-coming design):</p>
<table align="center" class="basic">
    <tbody>
        <tr class="error">
            <td title="Line 31" class="linenumber">31</td>
            <td class="codeContext">* html img, * html .png</td>
            <td class="parse-error">Lexical error at line 26, column 61.  Encountered: "&amp;" (38), after : ""                                              <span class="skippedString"> )&amp;&amp;(this.pngSet?this.pngSet=true:(this.nodeName == "IMG" &amp;&amp; this.src.toLowerCase().indexOf('.png')&gt;-1?(this.runtimeStyle.backgroundImage = "none", this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "', sizingMethod='image')", this.src = "transparent.gif"):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''), this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "', sizingMethod='crop')", this.runtimeStyle.backgroundImage = "none")),this.pngSet=true) ); </span></td>
        </tr>
        <tr class="error">
            <td title="Line 33" class="linenumber">33</td>
            <td class="codeContext">* html img, * html .png</td>
            <td class="parse-error">Parse error - Unrecognized                                               <span class="skippedString">                                     }                                 </span></td>
        </tr>
        <tr class="error">
            <td title="Line 437" class="linenumber">437</td>
            <td class="codeContext">.responder a img</td>
            <td class="parse-error">attempt to find a semi-colon before the property name. add it</td>
        </tr>
        <tr class="error">
            <td title="Line 437" class="linenumber">437</td>
            <td class="codeContext">.responder a img</td>
            <td class="parse-error">Property progid doesn't exist :                                               <span class="exp">                                     DXImageTransform                                 </span></td>
        </tr>
        <tr class="error">
            <td title="Line 437" class="linenumber">437</td>
            <td class="codeContext">.responder a img</td>
            <td class="parse-error">Parse Error                                              <span class="unrecognized">                                     DXImageTransform.Microsoft.Alpha(opacity=60);                                 </span></td>
        </tr>
        <tr class="error">
            <td title="Line 438" class="linenumber">438</td>
            <td class="codeContext">opacity</td>
            <td class="parse-error">Parse Error                                              <span class="unrecognized">                                     opacity: 0.6;                                 </span></td>
        </tr>
        <tr class="error">
            <td title="Line 439" class="linenumber">439</td>
            <td class="codeContext">opacity</td>
            <td class="parse-error">Parse error - Unrecognized                                               <span class="skippedString">                                     }                                 </span></td>
        </tr>
        <tr class="error">
            <td title="Line 441" class="linenumber">441</td>
            <td class="codeContext">.responder a:hover img</td>
            <td class="parse-error">attempt to find a semi-colon before the property name. add it</td>
        </tr>
        <tr class="error">
            <td title="Line 441" class="linenumber">441</td>
            <td class="codeContext">.responder a:hover img</td>
            <td class="parse-error">Property progid doesn't exist :                                               <span class="exp">                                     DXImageTransform                                 </span></td>
        </tr>
        <tr class="error">
            <td title="Line 441" class="linenumber">441</td>
            <td class="codeContext">.responder a:hover img</td>
            <td class="parse-error">Parse Error                                              <span class="unrecognized">                                     DXImageTransform.Microsoft.Alpha(opacity=100);                                 </span></td>
        </tr>
        <tr class="error">
            <td title="Line 442" class="linenumber">442</td>
            <td class="codeContext">opacity</td>
            <td class="parse-error">Parse Error                                              <span class="unrecognized">                                     opacity: 1;                                 </span></td>
        </tr>
        <tr class="error">
            <td title="Line 443" class="linenumber">443</td>
            <td class="codeContext">opacity</td>
            <td class="parse-error">Parse error - Unrecognized                                               <span class="skippedString">                                     }</span></td>
        </tr>
    </tbody>
</table>
<p><br />
So, all I do to fix this is find the numbers (on the left) and copy and paste the rules (that's the things that look like:</p>
<p><code style="font-size: 155%;">body {<br />
background: #FFFFFF;<br />
font: lighter 13px/20px Arial;<br />
color: #777777;<br />
}</code></p>
<p>When you've cut and pasted all of the code into a new document, save it as "invalid.css" in the same directory as your "style.css" or original stylesheet, and copy the link to your original CSS file on your pages that link to the "style.css", and paste it in the line underneath, but this time, rename the duplicated link to "invalid.css"</p>
<p>Good Luck!</p><br />
RSS feed by Autonomouse. You can view the whole site at http://autonomouse.co.nr]]></content:encoded>
      </item>
   </channel>
</rss>
