Answers.Body: <p>Is your css file located in the <code>/resources/</code> folder of your plugin? So your path should be something like:</p>
  
  <pre><code>&lt;plugin folder&gt;/resources/css/sitemaphtml.css
  </code></pre>
  
  <p>I've tried it myself and whilst you do get the <code>/cpresources/</code> part of the Url in your markup, the CSS file is loaded on the front end.</p>
  
  <p>EDIT: If you take a look in the <a href="https://craftcms.com/docs/plugins/resources" rel="nofollow">docs</a>, it says the following:</p>
  
  <blockquote>
    <p>By default, Craft will search for the resource file in its own
    craft/app/resources/ folder. If it can’t find the file there, it will
    check if the first segment of the resource path is set to a plugin
    handle. If it is, Craft will look for the resource file within that
    plugin’s resources/ folder.</p>
  </blockquote>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-16T13:17:43.183Z
Answers.Text: That was it all along, thank oyu very much for your help.
Answers.UserDisplayName: jmack
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-16T13:29:31.330Z
Answers.Text: No worries, I've done it myself :)
Answers.UserDisplayName: Steve Holland
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-16T11:39:36.837Z
Answers.LastActivityDate: 2016-03-16T17:53:57.907Z
Answers.LastEditDate: 2016-03-16T17:53:57.907Z
Answers.UserDisplayName: Steve Holland
Body: <p>Hey guys I have created a plugin with an accompanying Stylesheet which I am adding to the page via </p>
  
  <pre><code>class SitemaphtmlPlugin extends BasePlugin
  {
  
  function init(){
  
       craft()-&gt;templates-&gt;includeCssResource('sitemaphtml/css/sitemaphtml.css');
  }
  </code></pre>
  
  <p>however the link being generated is prefixing the path with cpresources/ making it 404.</p>
  
  <pre><code>/cpresources/sitemaphtml/css/sitemaphtml.css?x=xXhFyszUs 
  </code></pre>
  
  <p>how can i overcome this this?</p>
  
  <p>Cheers</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-03-15T17:15:58.103Z
Comments.Text: Are you trying to get the CSS file to load in the control panel or on the front-end of a site?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-03-16T09:29:31.707Z
Comments.Text: Hi thanks for the reply, I am trying to get the CSS to load on the front-end of the site. Cheers
Comments.UserDisplayName: jmack
Tags: <plugin-development><assets><css>
Title: Plugin Stylesheet 404
ThreadText: # Plugin Stylesheet 404
  
  (Asked by: username_0 on 2016-03-15)
  
  Hey guys I have created a plugin with an accompanying Stylesheet which I am adding to the page via
  
  ```
  class SitemaphtmlPlugin extends BasePlugin
  {
  
  function init(){
  
       craft()->templates->includeCssResource('sitemaphtml/css/sitemaphtml.css');
  }
  
  ```
  
  however the link being generated is prefixing the path with cpresources/ making it 404.
  
  ```
  /cpresources/sitemaphtml/css/sitemaphtml.css?x=xXhFyszUs 
  
  ```
  
  how can i overcome this this?
  
  Cheers
  
  **Tags:** plugin-development, assets, css
  
  > **Comments:**
  > **username_1**: Are you trying to get the CSS file to load in the control panel or on the front-end of a site?  
  > **username_0**: Hi thanks for the reply, I am trying to get the CSS to load on the front-end of the site. Cheers  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2016-03-16. Score: 2 | Accepted answer
  
  Is your css file located in the `/resources/` folder of your plugin? So your path should be something like:
  
  ```
  <plugin folder>/resources/css/sitemaphtml.css
  
  ```
  
  I've tried it myself and whilst you do get the `/cpresources/` part of the Url in your markup, the CSS file is loaded on the front end.
  
  EDIT: If you take a look in the [docs](https://craftcms.com/docs/plugins/resources), it says the following:
  
  > By default, Craft will search for the resource file in its own
  > craft/app/resources/ folder. If it can’t find the file there, it will
  > check if the first segment of the resource path is set to a plugin
  > handle. If it is, Craft will look for the resource file within that
  > plugin’s resources/ folder.
  
  > **Comments:**
  > **username_0**: That was it all along, thank oyu very much for your help.  
  > **username_2**: No worries, I've done it myself :)  
  
  ---
  
  