CSS3 Pie Integration with Wordpress

CSS3 Pie is a great tool for getting some CSS3 stuff to render in IE. Love it! But the integration with Wordpress seems to be quite complicated. Here's the situation:

Html on page template:

<div class="page_header_text center_shadow">


Function.php: (from http://www.position-relative.com/2011/04/using-css-pie-in-wordpress-themes-updated/ )

global $wp_styles; 
wp_enqueue_style(  "ie8", "http://dennishunink.nl/ghana/wp/wp-content/themes/ghanavakantie/style/iePie.css", false, $version_identifier, "all"); 
$wp_styles->add_data( "ie8", 'conditional', 'IE 8' );



position: relative;
behavior: url(PIE.htc);


Indeed, the iePie.css file is used. For example, background: # 000; works. But strangely, the PIE.htc file is not.

I tried different relative and absolute paths, loaded PIE.htc in different places.

The website is located at http://dennishunink.nl/ghana/wp/ (still under development)

Hope someone answers, will be very grateful for every suggestion!


source to share

1 answer

Similarly CSS3 and PIE do not work in IE 8

I am having problems applying PIE in another project. If I remember correctly, in the end it turned out to be a combination of pointing the right path, uploading the files in the right place, and serving the right document type (with PIE.php).


I noticed that no matter where the CSS file is loaded, the behavior is: url (PIE.php); will always link to root / PIE.php.


Logically, then I downloaded PIE.php to the root directory. Along with PIE.htc.

Serving the correct document type:

Documented at http://css3pie.com/documentation/known-issues/#content-type PIE.php loads PIE.htc, serving it with the correct document type, like this:

header( 'Content-type: text/x-component' );
include( 'PIE.htc' );


Hope it helps!



All Articles