Search code examples
phphtmlcsszen-cartcss3pie

PIE.htc location - how do I know where the relative path to the html is - zencart


I'm trying to use the css3 PIE.htc file for making nice rounded corners on IE.

I've read all the posts on this site relating to it and tried all diferrent combinations of path and I've also nowgot the PIE file in loads of folders but no-matter what I can't seem to get it to get it to work on IE8.

I'm using a virtual machine to view the site which is on my localhost (or 169.254.107.215 as my virtual machine calls it), here's the code I'm trying: - I think it has to do with the need for the htc file to be relative to the html (rather than the css file), like I say, I've tried many different combos

.rounded {
border: 1px solid #ccc;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
-moz-box-shadow: 2px 2px 3px #666;
-webkit-box-shadow: 2px 2px 3px #666;
box-shadow: 2px 2px 3px #666;
font-size: 20px;
padding: 4px 7px;
outline: 0;
-webkit-appearance: none;
width:250px;
position: relative;
behavior: url(PIE.htc);
}

<div class="rounded">stuff stuff stuff</div>

What am I doing wrong? Please help me :(

EDIT: I've tried creating a sinple one page website to test and I can get it to work alright so it must be a problem of where to put the htc file. I litterally have it everywhere I can think to put it.


Solution

  • The htc file should be relative to your HTML file. NOT your CSS file.

    I normally put it in the root directory. You may need to put a / infront of the path in your CSS file. So it would be /PIE.htc

    If you need help finding or making sure your file is in the proper directory. Check out this useful tutorial.

    http://www.htaccesstools.com/articles/full-path-to-file-using-php/