CSS3 PIE Forums
http://css3pie.com/forum/

Can't get it working locally, basic html?
http://css3pie.com/forum/viewtopic.php?f=3&t=1708
Page 1 of 1

Author:  PieCrustIsGood [ Mon Jun 25, 2012 12:39 pm ]
Post subject:  Can't get it working locally, basic html?

Despite all my efforts, I can't seem to get it working.
(I saw on jsfiddle they had the url in quotes. Other examples don't?)
Any help would be greatly appreciated. Thanks.

My Directory Structure:
Website Folder
-default.html
-Scripts Folder
--JQuery.js
-Styles Folder
--clean.css (meyer's reset sheet)
--style.css
--PIE.htc

Code:
<html>
   <title>Website</title>
<head>
   <link rel="stylesheet" type="text/css" href="Styles/clean.css" />
   <link rel="stylesheet" type="text/css" href="Styles/style.css" />
   <script type="text/javascript" src="Scripts/jquery-1.7.1.js"></script>
</head>
<body>
   <div id="wrapper">
      <div id="header">Put fancy logo here.</div>
      <div id="menu">
         <ul>
            <li><a href="http://google.com">Menu Item 1</a></li>
            <li><a href="http://google.com">Menu Item 2</a></li>
            <li><a href="http://google.com">Menu Item 3</a></li>
         </ul>
      </div>
   </div>
</body>
</html>


Code:
body {background-color:#FFFFFF; font-family:tahoma; font-size:12px; text-align:center;}

#wrapper {
background-color:#CFCFCF;
margin:0 auto;
text-align:left;
width:900px;
}
#header {
background-color:#B05800;
height:100px; width:100%;
}
#menu li {
    background: #CCC; /*fallback for non-CSS3 browsers*/
    background: -webkit-gradient(linear, 0 0, 0 100%, from(#CCC) to(#EEE)); /*old webkit*/
    background: -webkit-linear-gradient(#CCC, #EEE); /*new webkit*/
    background: -moz-linear-gradient(#CCC, #EEE); /*gecko*/
    background: -ms-linear-gradient(#CCC, #EEE); /*IE10*/
    background: -o-linear-gradient(#CCC, #EEE); /*opera 11.10+*/
    background: linear-gradient(#CCC, #EEE); /*future CSS3 browsers*/
    -pie-background: linear-gradient(#CCC, #EEE); /*PIE*/
    behavior: url('/Style/PIE.htc');
float:left;
}
#menu * {float:left;}
#menu a {color:black; text-decoration:none;}
#menu li {border:1px solid black; padding:5px;}

Author:  jason [ Tue Jun 26, 2012 2:12 pm ]
Post subject:  Re: Can't get it working locally, basic html?

When you say "locally", do you mean loaded from the filesystem via a file:/// url?

If so then your problem is probably the path you're using to reference the .htc:

behavior: url('/Style/PIE.htc');

The leading slash means relative to the root, which if you're loading from the filesystem is the root of the filesystem.

Author:  PieCrustIsGood [ Tue Jun 26, 2012 2:22 pm ]
Post subject:  Re: Can't get it working locally, basic html?

So basically it should be working as matches what I have in the code.

All that should be required is the .htc file, right?
Maybe I should settle for the .js version...

Author:  jason [ Tue Jun 26, 2012 2:26 pm ]
Post subject:  Re: Can't get it working locally, basic html?

...well you didn't answer the question, is my assumption correct?

I'm doubting that your files are at the root of your filesystem (e.g. file:///Style/PIE.htc), so I wouldn't expect your pasted code to work.

Another thing I just noticed is that in your HTML you're referencing things in a "Styles" directory but your behavior url is "Style", perhaps a mistake?

Author:  kalkulatorkredytowy [ Thu Jul 26, 2012 6:36 am ]
Post subject:  Re: Can't get it working locally, basic html?

jason wrote:
Another thing I just noticed is that in your HTML you're referencing things in a "Styles" directory but your behavior url is "Style", perhaps a mistake?


This is the problem right here. Fix it and it will work.

Page 1 of 1 All times are UTC - 7 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/