Answers.Body: <p>You will want to include the <code>siteUrl</code> variable before the file path to normalize all the resource URLs. That will also help when you move to production. For example: </p>
  
  <pre><code>{% includeCssFile siteUrl~'assets/html/css/slidestyle.css' %}
  </code></pre>
  
  <p>In your general config file, you can set different site URLs based on the server you are on.</p>
  
  <pre><code>return array(
      '*' =&gt; array(),
  
      'localhost =&gt; array(
          'devMode' =&gt; true,
          'siteUrl' =&gt; 'http://localhost/craft/'
      ),
      'yourProductionDomain.com' =&gt; array(
          'devMode' =&gt; false,
          'siteUrl' =&gt; 'http://www.yourProductionDomain.com'    
      ),
  );
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-07T22:36:29.310Z
Answers.Text: Thanks for your reply and solution, works like a charm!
  I´m just starting using craft in a local test site, and i think it´s awesome! I will implement it in my next project. One more question ( excuse me, but at this step all that i have are questions :) ) , is there a good tutorial about making a general site navigation? I mean, list sections, news section, single...
  Thank you Aaron!
Answers.UserDisplayName: Sebachenko
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-07T23:50:05.883Z
Answers.Text: Sure thing, @Sebachenko! Can you go ahead and select the response as the answer? As for navigations, I'm not sure of any tutorials. There are a few plugins that help, like https://github.com/am-impact/amnav. More plugins can be found here: http://straightupcraft.com/craft-plugins
Answers.UserDisplayName: Aaron Berkowitz
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-07T23:52:50.767Z
Answers.Text: You might have a look at [this answer](http://craftcms.stackexchange.com/a/6847/784) which is one common strategy to  generate site nav, integrating singles, channels, and structures.  And [here is a list](http://craftcms.stackexchange.com/a/1826/784) of some of various tutorial and resource sites that are available.
Answers.UserDisplayName: Douglas McDonald
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-14T00:28:17.160Z
Answers.Text: Done! Thanks Aaron and Douglas for your response! I will check your links.
Answers.UserDisplayName: Sebachenko
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-07T19:40:33.110Z
Answers.LastActivityDate: 2015-04-07T19:47:30.637Z
Answers.LastEditDate: 2015-04-07T19:47:30.637Z
Answers.UserDisplayName: Aaron Berkowitz
Body: <p>I´m having problems loading css files in some templates.</p>
  
  <p>Hi have this to load css files:</p>
  
  <pre><code>{% includeCssFile "assets/html/css/reset.css" %}
  {% includeCssFile "assets/html/css/general.css" %}
  {% includeCssFile "assets/html/css/typography.css" %}
  {% includeCssFile "assets/html/css/layout.css" %}
  {% includeCssFile "assets/html/css/formStyle.css" %}
  {% includeCssFile "assets/html/rs-plugin/css/settings.css" %}
  {% includeCssFile "assets/html/css/slidestyle.css" %}
  {{ getHeadHtml() }}
  </code></pre>
  
  <p>This follows this path: <a href="http://localhost/craft/assets/html/css/filename.css" rel="nofollow">http://localhost/craft/assets/html/css/filename.css</a></p>
  
  <p>It works great , and load the styles for example, in the news section.
  But, when i go to que news detail section, the styles don´t show.</p>
  
  <p>The news detail template extends the template layout used for the home page and other sections.</p>
  
  <p>The page looks for styles in this path: <a href="http://localhost/craft/" rel="nofollow">http://localhost/craft/</a><strong>news</strong>/assets/html/css/filename.css   and of course don´t find it. </p>
  
  <p>I try with routes ( don´t know exacly how it works , but try and didn´t work ).</p>
  
  <p>Help! :)</p>
  
  <p>Thanks. Sebastian.</p>
  
Tags: <css><error-templates>
Title: Problem loading css files in some templates
ThreadText: # Problem loading css files in some templates
  
  (Asked by: username_0 on 2015-04-07)
  
  I´m having problems loading css files in some templates.
  
  Hi have this to load css files:
  
  ```
  {% includeCssFile "assets/html/css/reset.css" %}
  {% includeCssFile "assets/html/css/general.css" %}
  {% includeCssFile "assets/html/css/typography.css" %}
  {% includeCssFile "assets/html/css/layout.css" %}
  {% includeCssFile "assets/html/css/formStyle.css" %}
  {% includeCssFile "assets/html/rs-plugin/css/settings.css" %}
  {% includeCssFile "assets/html/css/slidestyle.css" %}
  {{ getHeadHtml() }}
  
  ```
  
  This follows this path: <http://localhost/craft/assets/html/css/filename.css>
  
  It works great , and load the styles for example, in the news section.
  But, when i go to que news detail section, the styles don´t show.
  
  The news detail template extends the template layout used for the home page and other sections.
  
  The page looks for styles in this path: <http://localhost/craft/>**news**/assets/html/css/filename.css and of course don´t find it.
  
  I try with routes ( don´t know exacly how it works , but try and didn´t work ).
  
  Help! :)
  
  Thanks. Sebastian.
  
  **Tags:** css, error-templates
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-04-07. Score: 3 | Accepted answer
  
  You will want to include the `siteUrl` variable before the file path to normalize all the resource URLs. That will also help when you move to production. For example:
  
  ```
  {% includeCssFile siteUrl~'assets/html/css/slidestyle.css' %}
  
  ```
  
  In your general config file, you can set different site URLs based on the server you are on.
  
  ```
  return array(
      '*' => array(),
  
      'localhost => array(
          'devMode' => true,
          'siteUrl' => 'http://localhost/craft/'
      ),
      'yourProductionDomain.com' => array(
          'devMode' => false,
          'siteUrl' => 'http://www.yourProductionDomain.com'    
      ),
  );
  
  ```
  
  > **Comments:**
  > **username_0**: Thanks for your reply and solution, works like a charm! I´m just starting using craft in a local test site, and i think it´s awesome! I will implement it in my next project. One more question ( excuse me, but at this step all that i have are questions :) ) , is there a good tutorial about making a general site navigation? I mean, list sections, news section, single... Thank you username_1!  
  > **username_1**: Sure thing, @username_0! Can you go ahead and select the response as the answer? As for navigations, I'm not sure of any tutorials. There are a few plugins that help, like https://github.com/am-impact/amnav. More plugins can be found here: http://straightupcraft.com/craft-plugins  
  > **username_2**: You might have a look at [this answer](http://craftcms.stackexchange.com/a/6847/784) which is one common strategy to  generate site nav, integrating singles, channels, and structures.  And [here is a list](http://craftcms.stackexchange.com/a/1826/784) of some of various tutorial and resource sites that are available.  
  > **username_0**: Done! Thanks username_1 and username_2 for your response! I will check your links.  
  
  ---
  
  