Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

CSS Validator & Joomla

Posted on 2010-11-11
2
Medium Priority
?
612 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 2000 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Creating a CSS block that only applies to printing By default, all of your CSS applies to every possible view of your page - whether on screen, printed, landscape, touch-screen, or whatever.  You can, however, add CSS that only applies under certai…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

773 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