Answers.Body: <p>For static assets I usually use something like this:</p>
  
  <pre><code>{% if craft.debugMode %}
      {% set assetsUrl = siteUrl %}
  {% else %}
      {% set assetsUrl = "assets.mysite.com" %}
  {% endif %}
  </code></pre>
  
  <p>And then I can set assets URL's the same way as navigation URLs. ie.</p>
  
  <pre><code>{% includeJsFile assetsUrl ~ "js/init.js" %}
  
  {% includecss %}
  body.landing #page-wrapper {
      background-image: url(" {{ assetsUrl }}img/pic01.jpg  }}");
  
  }
  {% endincludecss %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-13T05:23:08.887Z
Answers.LastActivityDate: 2015-08-13T11:26:38.260Z
Answers.LastEditDate: 2015-08-13T11:26:38.260Z
Answers.UserDisplayName: j00lz
Body: <p>i just started using craft on a local domain and i have some issues.
  my stylesheet(a few files) are loaded using html<code>&lt;link rel="stylesheet" href="style/style.css"&gt;</code>, and it works great for css and js files, but files requested from within the css aren't loading.
  for example the Font Awesome @fontface.</p>
  
  <p>Any ideas? and the is any issue using html instead of the {{ getHeadHtml() }} method?</p>
  
  <p>Thanks Ahead!</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-25T20:26:37.487Z
Comments.Text: Have you tried using root relative paths?  `/style/style.css` instead of `style/style.css`?
Comments.UserDisplayName: Steve Adams
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-25T23:05:28.840Z
Comments.Text: yes, iv'e tried
Comments.UserDisplayName: Samuel E.
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-25T23:19:35.073Z
Comments.Text: How about in the CSS file itself?  What do your `selector: url(path);` look like?
Comments.UserDisplayName: Steve Adams
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-26T09:56:28.007Z
Comments.Text: its relarive: url(url/to/some/path);
Comments.UserDisplayName: Samuel E.
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-27T02:11:54.297Z
Comments.Text: https://yoast.com/relative-urls-issues/
Comments.UserDisplayName: Steve Adams
Tags: <css>
Title: Issues loading files from within css files
ThreadText: # Issues loading files from within css files
  
  (Asked by: username_0 on 2015-07-25)
  
  i just started using craft on a local domain and i have some issues.
  my stylesheet(a few files) are loaded using html`<link rel="stylesheet" href="style/style.css">`, and it works great for css and js files, but files requested from within the css aren't loading.
  for example the Font Awesome @fontface.
  
  Any ideas? and the is any issue using html instead of the {{ getHeadHtml() }} method?
  
  Thanks Ahead!
  
  **Tags:** css
  
  > **Comments:**
  > **username_1**: Have you tried using root relative paths?  `/style/style.css` instead of `style/style.css`?  
  > **username_0**: yes, iv'e tried  
  > **username_1**: How about in the CSS file itself?  What do your `selector: url(path);` look like?  
  > **username_0**: its relarive: url(url/to/some/path);  
  > **username_1**: https://yoast.com/relative-urls-issues/  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2015-08-13. Score: 1
  
  For static assets I usually use something like this:
  
  ```
  {% if craft.debugMode %}
      {% set assetsUrl = siteUrl %}
  {% else %}
      {% set assetsUrl = "assets.mysite.com" %}
  {% endif %}
  
  ```
  
  And then I can set assets URL's the same way as navigation URLs. ie.
  
  ```
  {% includeJsFile assetsUrl ~ "js/init.js" %}
  
  {% includecss %}
  body.landing #page-wrapper {
      background-image: url(" {{ assetsUrl }}img/pic01.jpg  }}");
  
  }
  {% endincludecss %}
  
  ```
  
  
  ---
  
  