Solved

CSS Validator & Joomla

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
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.
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 …
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…

760 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

21 Experts available now in Live!

Get 1:1 Help Now