Solved

CSS Validator & Joomla

Posted on 2010-11-11
2
589 Views
Last Modified: 2012-08-13
Hi Experts,

When I upload a css file to check it in the W3C validator it is successfully validated.  When I point the validator to my site (Joomla site) it fails with 2 errors:

20  Unknown error org.w3c.www.http.HttpInvalidValueException: Invalid content type.  
21  Parse Error //-->  

The site looks fine and the HTML successfully validates.

Any idea why this happens?  It there something in Joomla causing this?


Thanks,

HNM
0
Comment
Question by:HelpNearMe
2 Comments
 
LVL 22

Accepted Solution

by:
remorina earned 500 total points
ID: 34116814
Hi HelpNearMe,
First of all when you pass a URL to the W3 validation it validates the markup (HTML) not the CSS.

The error you are receiving doesn't have anything to do with either your html or css, actually it's from your server which seems not to return a Content-Type header.
The validator didn't even try to validate your code since it can't parse it hence the (Parse Error)

if your web hosting is linux based you can try to have your provider correct the server's .htaccess file to define a MIME type for HTML files or add it yourself if you have your own file.

There are many other possibilities depending on the situation, whether it was linux, IIS, re-write etc.., so you should troubleshoot your server's header (Content-Type) rather than looking for an error in your code or css.

Hope this helps

0
 

Author Comment

by:HelpNearMe
ID: 34117125
Hi remorina,

 W3C does validate CSS  http://jigsaw.w3.org/css-validator/

I'll look at the MIME & .htaccess file suggestion but does anyone else have comments?

Could this be related to Joomla?

HMM
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now