Forums
View unanswered posts | View active topics It is currently Thu Jul 24, 2014 3:39 pm



Reply to topic  [ 5 posts ] 
 Can't get it working locally, basic html? 
Author Message

Joined: Mon Jun 25, 2012 12:33 pm
Posts: 2
Post 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;}


Mon Jun 25, 2012 12:39 pm
Profile

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1441
Post 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.


Tue Jun 26, 2012 2:12 pm
Profile

Joined: Mon Jun 25, 2012 12:33 pm
Posts: 2
Post 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...


Tue Jun 26, 2012 2:22 pm
Profile

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1441
Post 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?


Tue Jun 26, 2012 2:26 pm
Profile

Joined: Thu Jul 26, 2012 6:34 am
Posts: 1
Post 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.


Thu Jul 26, 2012 6:36 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: Bing [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.