Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

CSS Validator & Joomla

Posted on 2010-11-11
2
Medium Priority
?
610 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
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 tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
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

715 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