W3C CSS validator problem
micknewton
Registered Users Posts: 269 Major grins
I was trying to use the W3C CSS validator to check one of my pages (http://micknewton.smugmug.com/gallery/5629811_ktrrX), and it kept reporting the following error:
Servlet has thrown exception:javax.servlet.ServletException: Timed out
So, I tried it with some of my other pages, and I got the same error with every one that I tried. Even with the control panel page.
I narrowed it down to this piece of CSS code in the SmugMug Gradient theme:
[html].smugmug_ajax #smugmug, .smugmug_ajax #header, .smugmug_ajax #footer {
margin-left: 15px;
margin-right: 15px;
min-width: 785px;
width: auto;
}[/html]
Apparently, the W3C CSS validator chokes on the "< ! [ endif ] - - >" part. I removed the comment wrappers around the _width part and the validator works fine. It still reports 150 errors in the SmugMug CSS, but at least it doesn't throw an exception.
I'm using my own theme, and I based it on the SmugMug Gradient theme. This piece of code was in my theme, unchanged from the gradient theme. As I said, when I took it out the validator started working again. Just to be sure, I switch my site to the SmugMug Gradient theme and tested again. Sure enough, the validator choked again.
Note:
Even the textarea that I'm typing this message into doesn't like the code! When I paste the code in and hit 'Preview Post' it strips out the same parts that the CSS validator chokes on. I tried wrapping it CODE and then HTML tags, but it still wants to strip it out! I think I have it so it will display okay now, but I'm not sure. Bizarre! If it doesn't show up in the thread when I post this message, look for the code in the Gradient theme. The parts it chokes on is the "if IE 6" and "endif" HTML comments around the "_width: expression".
Servlet has thrown exception:javax.servlet.ServletException: Timed out
So, I tried it with some of my other pages, and I got the same error with every one that I tried. Even with the control panel page.
I narrowed it down to this piece of CSS code in the SmugMug Gradient theme:
[html].smugmug_ajax #smugmug, .smugmug_ajax #header, .smugmug_ajax #footer {
margin-left: 15px;
margin-right: 15px;
min-width: 785px;
width: auto;
}[/html]
Apparently, the W3C CSS validator chokes on the "< ! [ endif ] - - >" part. I removed the comment wrappers around the _width part and the validator works fine. It still reports 150 errors in the SmugMug CSS, but at least it doesn't throw an exception.
I'm using my own theme, and I based it on the SmugMug Gradient theme. This piece of code was in my theme, unchanged from the gradient theme. As I said, when I took it out the validator started working again. Just to be sure, I switch my site to the SmugMug Gradient theme and tested again. Sure enough, the validator choked again.
Note:
Even the textarea that I'm typing this message into doesn't like the code! When I paste the code in and hit 'Preview Post' it strips out the same parts that the CSS validator chokes on. I tried wrapping it CODE and then HTML tags, but it still wants to strip it out! I think I have it so it will display okay now, but I'm not sure. Bizarre! If it doesn't show up in the thread when I post this message, look for the code in the Gradient theme. The parts it chokes on is the "if IE 6" and "endif" HTML comments around the "_width: expression".
0
Comments
If you're not sure which code I'm talking about, let me know and I'll find a way to get it to you. Maybe if I wrap carefully it in aluminum foil and bubble pack...
The page displays fine, in FF3 and IE7, with or without the conditional comment for IE. I haven't tested it with IE6 though. If someone tells me they have a problem viewing my page with IE6, then I'll consider restoring the conditional comments. Otherwise, I'll just leave it as it is.
It would be nice if the SmugMug code would pass validation. It would make it a lot easier for clients like me to validate our own code. In fact, I'm just going to hold my breath until that gets done. :cry
Why don't you send them feedback on the validator with a sample that it chokes on. Even if it's not legal CSS, their validator shouldn't choke.
Here's their feedback page: http://jigsaw.w3.org/css-validator/Email.html.
Homepage • Popular
JFriend's javascript customizations • Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
Actually, I checked and someone else had already reported that problem. They say it's been fixed. Apparently, not so well.