How to detect whether CSS enabled or not using Javascript

Testing if CSS is enabled or not from JavaScript would be pointless.

Your visitors are going to belong to one of the following three groups.

  1. HTML enabled, CSS enabled, JavaScript enabled
  2. HTML enabled, CSS enabled, JavaScript disabled
  3. HTML enabled, CSS disabled, JavaScript disabled

The only exceptions would be people running 15 year old browsers that don’t support CSS but those are not going to support most of the JavaScript either - fortunately that person (there’s only one of her) isn’t all that likely to visit your site.