Generated CSS Property I can't Find

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
wxman
Regular
Posts: 19
Joined: Tue Nov 22, 2005 7:05 pm

Generated CSS Property I can't Find

Post by wxman » Sun Jan 15, 2006 11:04 pm

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.

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Generated CSS Property I can't Find

Post by garvinhicking » Mon Jan 16, 2006 11:32 am

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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

User avatar
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert » Mon Jan 16, 2006 5:05 pm

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.
Judebert
---
Website | Wishlist | PayPal

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking » Mon Jan 16, 2006 5:35 pm

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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

User avatar
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert » Mon Jan 16, 2006 10:00 pm

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.
Judebert
---
Website | Wishlist | PayPal

wxman
Regular
Posts: 19
Joined: Tue Nov 22, 2005 7:05 pm

Post by wxman » Tue Jan 17, 2006 5:09 pm

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.

User avatar
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert » Tue Jan 17, 2006 8:36 pm

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.

wxman
Regular
Posts: 19
Joined: Tue Nov 22, 2005 7:05 pm

Post by wxman » Tue Jan 17, 2006 9:53 pm

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.

User avatar
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert » Wed Jan 18, 2006 5:07 am

We'd love to see it.
Judebert
---
Website | Wishlist | PayPal

Post Reply