Page 1 of 1

Generated CSS Property I can't Find

Posted: Sun Jan 15, 2006 11:04 pm
by wxman
I’ve made a custom template design for our site’s new blog. I’m using all CSS, except for the plug-ins. I tried to validate the page through W3C, and the page itself does, but not the style sheet. Here's the error:

Code: Select all

URI : http://www.tlt.com/serendipity/index.php?/serendipity.css
Line: 2 Context : img 
Property behavior doesn't exist : url("http://www.tlt.com/serendipity/index.php?/plugin/pngbehavior.htc") 
I know this comes from Serendipity’s generated content, but I can’t find the PHP that it came from. I know it’s being picky, but I would like to validate it eventually. The page is at http://www.tlt.com/serendipity/index.php in case you want to see it. It’s not done yet, but at least it’s a start. If you do look, checkout the parchment background in the middle. Two diferent layers make it look like it’s sizing to fit the page.

Re: Generated CSS Property I can't Find

Posted: Mon Jan 16, 2006 11:32 am
by garvinhicking
This CSS comes from the "browsercompatibility" plugin. This CSS is required to make the Poor Internet Explorer show transparent PNG images.

So you can uninstall that plugin if you don't want this functionality...

Regards,
Garvin

Posted: Mon Jan 16, 2006 5:05 pm
by judebert
I think the bigger question is why it can't find pngbehavior.htc. Does s9y call 'external_plugin' hook when it finds the 'plugin/' as an argument to index.php? It appears this is where the thing is failing.

As a temporary, untested fix, you could go to line 51 or your serendipity_event_browsercompatibility.php (in plugins/serendipity_event_browsercompatibility/) and change it from this:

Code: Select all

img {
   behavior: url("<?php echo $serendipity['baseURL'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : ''); ?>plugin/pngbehavior.htc");
}
to this:

Code: Select all

img {
   behavior: url("<?php echo $serendipity['baseURL'];?>/plugins/serendipity_event_browsercompatibility/pngbehavior.htc");
}
That's a direct reference to the actual, existing file. It's not as portable as the existing code, which is why it should be considered only a temporary fix. But it ought to validate, and allow Internet Exploder to show transparent PNGs.

Posted: Mon Jan 16, 2006 5:35 pm
by garvinhicking
Judebert: The problem was that the "beahviour" property is not a valid CSS property. The file loads allright, there is no problem with it. Only in validation.

But the solution that MSIE requires is not validatable.

Regards,
Garvin

Posted: Mon Jan 16, 2006 10:00 pm
by judebert
Ah. Well, inn't that special?

Of course it's not a valid property. And that error message is perfectly understandable, now that I read it with that in mind. Duh.

Apparently I've still got too high an opinion of Everybody's Favorite Browser (tm). Sorry to waste everybody's time.

Posted: Tue Jan 17, 2006 5:09 pm
by wxman
Sorry about that! I didn't mean to start an argument. I'll give the fix you said a try. I can get rid of the plug-in anyway as long as I don't use png's which, unfortunatly, I don't because of IE problems.

Thanks for the help.

Posted: Tue Jan 17, 2006 8:36 pm
by judebert
No argument here. Just me, being silly again.

My "fix" won't help anything; it just references the file directly. The problem is that "behavior" is not a valid property for "img" (or anything else, really). It's an IE abomination I was not previously aware of.

When in doubt, Garvin knows all.

Posted: Tue Jan 17, 2006 9:53 pm
by wxman
I figured that's what it was. I use CSS all the time, and I've never heard of it either. I was just afraid that "fixing" the problem would just make things worse.
I removed the plug-in and it validates just fine now. Of course my wife just came to me and said that the design isn't quite what she wanted, so now I'm doing it all again!
I just can't win in this business. I think I'm going to stick to using all CSS, and keep away from the tables if I can. It really does seem to come out better in the end. Thanks again for all the help. If you're at all interested, I'll post here when the boss (wife) says it's done so you can see the final design.

Posted: Wed Jan 18, 2006 5:07 am
by judebert
We'd love to see it.