|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hello,
I was validating an HTML page CSS with http://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? .... I have seen many CSS documents that start with a comment. Thank You, Miguel |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
shapper wrote:
> I was validating an HTML page CSS with http://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? > > ... I have seen many CSS documents that start with a comment. How did you format the comment? -- -bts -Friends don't let friends drive Vista |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
shapper wrote:
> Hello, > > I was validating an HTML page CSS with http://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 STUDIO http://www.LittleWorksStudio.com |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
shapper wrote:
> 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. http://jigsaw.w3.org/css-validator/v...m%2Fstudio.php W3C CSS Validator results for http://www.littleworksstudio.com/studio.php Some warnings for not specifying background-color on my navbar links that I have preset...but as you can see how they start: http://www.littleworksstudio.com/styles/basic.css Maybe if we could see the live example, the actual output might reveal the error...So you're Visual Studio must be throwing in something else that make the file invalid. A MS product that would produce non-compliant code? Perish the thought! -- Take care, Jonathan ------------------- LITTLE WORKS STUDIO http://www.LittleWorksStudio.com |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
On Mar 2, 3:39 pm, "Jonathan N. Little" <lws4...@central.net> wrote:
> shapper wrote: > > 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. > > http://jigsaw.w3.org/css-validator/v...s2&warning=2&u.... > W3C CSS Validator results forhttp://www.littleworksstudio.com/studio.php > > Some warnings for not specifying background-color on my navbar links > that I have preset...but as you can see how they start: > > http://www.littleworksstudio.com/styles/basic.css > > Maybe if we could see the live example, the actual output might reveal > the error...So you're Visual Studio must be throwing in something else > that make the file invalid. A MS product that would produce > non-compliant code? Perish the thought! > > -- > Take care, > > Jonathan > ------------------- > LITTLE WORKS STUDIOhttp://www.LittleWorksStudio.com Yes, I found that when it starts with a comment or empty line the CSS files gets the following characters at the start:  Have no idea why. Going to try to find out why. Thanks, Miguel |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
On Mar 2, 4:06 pm, shapper <mdmo...@gmail.com> wrote:
> On Mar 2, 3:39 pm, "Jonathan N. Little" <lws4...@central.net> wrote: > > > > > shapper wrote: > > > 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. > > >http://jigsaw.w3.org/css-validator/v...s2&warning=2&u.... > > W3C CSS Validator results forhttp://www.littleworksstudio.com/studio.php > > > Some warnings for not specifying background-color on my navbar links > > that I have preset...but as you can see how they start: > > >http://www.littleworksstudio.com/styles/basic.css > > > Maybe if we could see the live example, the actual output might reveal > > the error...So you're Visual Studio must be throwing in something else > > that make the file invalid. A MS product that would produce > > non-compliant code? Perish the thought! > > > -- > > Take care, > > > Jonathan > > ------------------- > > LITTLE WORKS STUDIOhttp://www.LittleWorksStudio.com > > Yes, I found that when it starts with a comment or empty line the CSS > files gets the following characters at the start: > >  > > Have no idea why. Going to try to find out why. > > Thanks, > Miguel The symbol is ï » ¿ Without the spaces ... but now I see that is not VS. It seems to be the View CSS tool of the Firefox developer bar. |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
shapper wrote:
> Yes, I found that when it starts with a comment or empty line the CSS > files gets the following characters at the start: > >  > > Have no idea why. Going to try to find out why. Curse of the BOM http://www.google.com/search?hl=en&s...racter&spell=1 BOM character - Google Search -- Take care, Jonathan ------------------- LITTLE WORKS STUDIO http://www.LittleWorksStudio.com |
|
![]() |
| Outils de la discussion | |
|
|