tags:

views:

73

answers:

2

Can anyone explain why using comments like this in css cause really weird effects SOMETIMES?


This works fine

/*  ------------------------------  */
/*  some text here                  */
/*  ------------------------------  */


This appear to work fine too until I reload a page and then the page is all messed up in firefox and in chrome if I use any comments like this in css

<!-- sometext here -->
+10  A: 

For CSS files.

<!-- -->

Is not a comment syntax.

Ólafur Waage
oh that would explain a lot then, I just assumed there was a few different ways of doing it, so this style is for html?
jasondavis
Right, that comment format is for HTML and XML (both derived from SGML). In general, every language will have its own comment format(s), and it's wise to be sure that you're using a correct one.
Greg Hewgill
+2  A: 

Why are you using XML-like comment blocks in CSS? Your first form (/* comment */) is the only one supported in CSS.

Michael Petrotta