Using CSS PIE in WordPress themes, updated

In light of the nice comments on my previous post on this topic I’m going to share how I’m doing this now, it’s a little easier to manage for me, at least and may be for others.

I’m adding this to functions.php instead of the my_render_ie_pie function I used before, using the WordPress function wp_enqueue_style, the preferred way to add styles to the rendered page:

And then ie8.css just has this, a list of styles that need border radius or some other CSS3 feature:

Notice that all elements that need PIE must have position: relative.

ie7.css is longer (surprise!) but has the same PIE.htc section as above.

I find this easier to get my head around, plus it cleans up functions.php and loads IE stylesheets the proper way.

5 comments

  1. thanks this helped me alot , its very frustrated working with .css files and different browsers when wordpress noobie

  2. Good morning.
    For some reason I only get the pie.htc to work on my wordpress home page. When I go to the other pages no pie.htc??
    If I go into the wordpress dashboard and assign a different page as my home page, say the about page, the pie.htc works great on that page but not on the home page.
    I have tried everything that this article suggests with no luck. Any suggestions?
    Thanks
    p.s website ins local at this point

Leave a Reply

Your email address will not be published. Required fields are marked *