PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.info.authoring.CSS > Can't a CSS file start with a comment to be validated?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Can't a CSS file start with a comment to be validated?

Réponse
 
LinkBack Outils de la discussion
Vieux 02/03/2008, 15h41   #1
shapper
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Can't a CSS file start with a comment to be validated?

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
  Réponse avec citation
Vieux 02/03/2008, 15h55   #2
Beauregard T. Shagnasty
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Can't a CSS file start with a comment to be validated?

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
  Réponse avec citation
Vieux 02/03/2008, 16h02   #3
Jonathan N. Little
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Can't a CSS file start with a comment to be validated?

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
  Réponse avec citation
Vieux 02/03/2008, 16h15   #4
shapper
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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



  Réponse avec citation
Vieux 02/03/2008, 16h39   #5
Jonathan N. Little
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Can't a CSS file start with a comment to be validated?

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
  Réponse avec citation
Vieux 02/03/2008, 17h06   #6
shapper
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Can't a CSS file start with a comment to be validated?

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
  Réponse avec citation
Vieux 02/03/2008, 17h17   #7
shapper
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Can't a CSS file start with a comment to be validated?

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.
  Réponse avec citation
Vieux 02/03/2008, 18h43   #8
Jonathan N. Little
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Can't a CSS file start with a comment to be validated?

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
  Réponse avec citation
Vieux 02/03/2008, 22h20   #9
Blinky the Shark
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Can't a CSS file start with a comment to be validated?

Jonathan N. Little wrote:

> Curse of the BOM


I rented that last week. It's almost as bad as "Plan 9 From Outer Space".


--
Blinky
Killing all posts from Google Groups
The Usenet Improvement Project: http://improve-usenet.org
Blinky: http://blinkynet.net

  Réponse avec citation
Vieux 02/03/2008, 23h09   #10
Jonathan N. Little
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Can't a CSS file start with a comment to be validated?

Blinky the Shark wrote:
> Jonathan N. Little wrote:
>
>> Curse of the BOM

>
> I rented that last week. It's almost as bad as "Plan 9 From Outer Space".
>


That is one I haven't seen. Such a cult following I should see it just
for context.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
  Réponse avec citation
Vieux 02/03/2008, 23h31   #11
Blinky the Shark
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Can't a CSS file start with a comment to be validated?

Jonathan N. Little wrote:

> Blinky the Shark wrote:
>> Jonathan N. Little wrote:
>>
>>> Curse of the BOM

>>
>> I rented that last week. It's almost as bad as "Plan 9 From Outer Space".
>>

>
> That is one I haven't seen. Such a cult following I should see it just
> for context.


Oh, absoLOOTly! Carefuly watch for mundane objects dressed up to look
like futuristic technology. Example: on a table that represents, IIRC,
the communications center, along with some old radio gear, is one of those
highway flashers that typically hooked onto a barracade sawhorse and
consisted of a flattish two-sided round plastic lens that was attached to
the top of a big rectangular battery. But so you won't recognize it as
such, they've laid an X across the round lens with a couple pieces of
gaffers tape.

And it's got Vampira.

And cardboard headstones in the cemetary, that move around when someone
walks past them.

What's not to love?

Rent it. Rent it now. Report back!


--
Blinky
Killing all posts from Google Groups
The Usenet Improvement Project: http://improve-usenet.org
Blinky: http://blinkynet.net

  Réponse avec citation
Vieux 02/03/2008, 23h35   #12
Blinky the Shark
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Can't a CSS file start with a comment to be validated?

Blinky the Shark wrote:

> Jonathan N. Little wrote:
>
>> Blinky the Shark wrote:
>>> Jonathan N. Little wrote:
>>>
>>>> Curse of the BOM
>>>
>>> I rented that last week. It's almost as bad as "Plan 9 From Outer Space".
>>>

>>
>> That is one I haven't seen. Such a cult following I should see it just
>> for context.

>
> Oh, absoLOOTly! Carefuly watch for mundane objects dressed up to look
> like futuristic technology. Example: on a table that represents, IIRC,
> the communications center, along with some old radio gear, is one of those
> highway flashers that typically hooked onto a barracade sawhorse and
> consisted of a flattish two-sided round plastic lens that was attached to
> the top of a big rectangular battery. But so you won't recognize it as
> such, they've laid an X across the round lens with a couple pieces of
> gaffers tape.
>
> And it's got Vampira.
>
> And cardboard headstones in the cemetary, that move around when someone
> walks past them.
>
> What's not to love?
>
> Rent it. Rent it now. Report back!


Oh, and (IMDB): "Bela Lugosi appears in footage shot just before his
death, but with no script in mind. Edward D. Wood Jr. wrote the script to
accommodate all the footage shot in a cemetery and outside Tor Johnson's
house in the new production. Lugosi was doubled by Tom Mason, Wood's
wife's chiropractor, who was significantly taller than Lugosi, and played
the part with a cape covering his face."

</OT>

--
Blinky
Killing all posts from Google Groups
The Usenet Improvement Project: http://improve-usenet.org
Blinky: http://blinkynet.net

  Réponse avec citation
Vieux 03/03/2008, 00h38   #13
shapper
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Can't a CSS file start with a comment to be validated?

On Mar 2, 10:35 pm, Blinky the Shark <no.s...@box.invalid> wrote:
> Blinky the Shark wrote:
> > Jonathan N. Little wrote:

>
> >> Blinky the Shark wrote:
> >>> Jonathan N. Little wrote:

>
> >>>> Curse of the BOM

>
> >>> I rented that last week. It's almost as bad as "Plan 9 From Outer Space".

>
> >> That is one I haven't seen. Such a cult following I should see it just
> >> for context.

>
> > Oh, absoLOOTly! Carefuly watch for mundane objects dressed up to look
> > like futuristic technology. Example: on a table that represents, IIRC,
> > the communications center, along with some old radio gear, is one of those
> > highway flashers that typically hooked onto a barracade sawhorse and
> > consisted of a flattish two-sided round plastic lens that was attached to
> > the top of a big rectangular battery. But so you won't recognize it as
> > such, they've laid an X across the round lens with a couple pieces of
> > gaffers tape.

>
> > And it's got Vampira.

>
> > And cardboard headstones in the cemetary, that move around when someone
> > walks past them.

>
> > What's not to love?

>
> > Rent it. Rent it now. Report back!

>
> Oh, and (IMDB): "Bela Lugosi appears in footage shot just before his
> death, but with no script in mind. Edward D. Wood Jr. wrote the script to
> accommodate all the footage shot in a cemetery and outside Tor Johnson's
> house in the new production. Lugosi was doubled by Tom Mason, Wood's
> wife's chiropractor, who was significantly taller than Lugosi, and played
> the part with a cape covering his face."
>
> </OT>
>
> --
> Blinky
> Killing all posts from Google Groups
> The Usenet Improvement Project:http://improve-usenet.org
> Blinky:http://blinkynet.net


Yep,

VS 2008 problem. ASP.NET and VisualStudio 2008 is great for server
side, database, web services, ...
.... but it sucks at rendering.

I don't use any of the easy to use Asp.Net controls ... always
something goes wrong.

Anyway, I am not using Asp.Net theme anymore and I would like an
advice.
What is the best way to organize my CSS files?

I am adding the following:

<style type="text/css" media="Screen">@import url("styles/
master.css")</style>

Then on master.css I have:
@import url("reset.css");
@import url("base.css");
@import url("print.css");

Could you tell me if I am adding the master CSS file the right way and
if this is a good way to organize my styles?
How to you usually to it?

Thank You,
Miguel


  Réponse avec citation
Vieux 03/03/2008, 16h49   #14
Andreas Prilop
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Can't a CSS file start with a comment to be validated?

On Sun, 2 Mar 2008, shapper wrote:

>> Visual Studio must be throwing in something else

>
> Yes, I found that when it starts with a comment or empty line
> the CSS files gets the following characters at the start:
> 


So Visual Studio is the brain-dead program that spoils
*ASCII only* text files by inserting a BOM.

Remove the BOM from ASCII files!
http://www.unics.uni-hannover.de/nhtcapri/bom.css

--
In memoriam Alan J. Flavell
http://groups.google.com/groups/sear...Alan.J.Flavell
  Réponse avec citation
Vieux 03/03/2008, 23h27   #15
shapper
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Can't a CSS file start with a comment to be validated?

On Mar 3, 3:49 pm, Andreas Prilop <aprilop2...@trashmail.net> wrote:
> On Sun, 2 Mar 2008, shapper wrote:
> >> Visual Studio must be throwing in something else

>
> > Yes, I found that when it starts with a comment or empty line
> > the CSS files gets the following characters at the start:
> > 

>
> So Visual Studio is the brain-dead program that spoils
> *ASCII only* text files by inserting a BOM.
>
> Remove the BOM from ASCII files!
> http://www.unics.uni-hannover.de/nhtcapri/bom.css
>
> --
> In memoriam Alan J. Flavellhttp://groups.google.com/groups/search?q=author:Alan.J.Flavell


I had solved it ... just saved the file in Notepad once and it become
ok.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 02h51.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,22938 seconds with 23 queries