Re: Can't a CSS file start with a comment to be validated?
On Mar 2, 3:02 pm, "Jonathan N. Little" <lws4...@central.net> wrote:
> shapper wrote:
> > Hello,
>
> > I was validating an HTML page CSS withhttp://jigsaw.w3.org/css-validator/
> > and I got multiple errors.
>
> > The problem was that I my CSS seemed fine and I was not getting any
> > detail about the errors.
>
> > Then I removed the comment I had on the start of each CSS file and all
> > the errors disappeared.
>
> > Can't a CSS file start with a comment to be validated?
>
> Sure it can. How did you comment? Hint: CSS is *not* HTML.
>
> /* a CSS valid comment */
>
> --
> Take care,
>
> Jonathan
> -------------------
> LITTLE WORKS STUDIOhttp://www.LittleWorksStudio.com
I created a simple CSS file in Visual Studio which creates a text file
with extension css.
My file code is:
..empty{}
/*
Base
Global styling rules
Date: 01-03-2008
*/
body
{
color: #606060;
font-family: arial, verdana, helvetica, sans-serif;
}
The empty class is just something I added to check if the file is
validated and it is.
Do you want me to upload the CSS file to my server?
The way I validated was:
1. Ran MyPage.aspx
2. Used Firefox, Developer Bar > Tools > Validate Local CSS
The HTML is validated fine. The CSS is only validated if I add the
style at the beginning.
Thank You,
Miguel
|