Solved

CSS Validator & Joomla

Posted on 2010-11-11
2
594 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
css img-response wont work properly 7 30
ASP.net Fit 3 divs on screen side by side 3 40
Looking for magnifying glass wingding font 3 18
dashicon not showing on one website 13 28
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

830 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