Answers.Body: <p>I had a similar issue...my Craft3 blog pagination was losing the link to my <em>main.css</em> file after the first page, so all content would show but styling disappeared after the main blog index page. As suggested above, I now have my css.main in <code>/web/css/main.css</code>, and all of the pagination and styling works perfectly.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-23T15:55:53.163Z
Answers.LastActivityDate: 2018-06-23T16:06:09.620Z
Answers.LastEditDate: 2018-06-23T16:06:09.620Z
Answers.UserDisplayName: matt.bryant
Answers.Body: <p>As Ben said, you want them in the public folder. Also, you may want to use the Twig tag <code>{% includeCssFile ...%)</code> instead of the HTML <code>&lt;link rel="stylesheet" ...&gt;</code>.</p>
  
  <p>It outputs the same way, but it works better once you start having different template folders on your site. Documentation can be found here: <a href="https://craftcms.com/docs/templating/includecssfile" rel="nofollow noreferrer">https://craftcms.com/docs/templating/includecssfile</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-04T02:28:57.440Z
Answers.Text: I didnt know about the includeCSSFile. I ended up changing my css src to ../public/master.css so that all my other templates could access it
Answers.UserDisplayName: kingkelly
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-02T07:18:00.720Z
Answers.LastActivityDate: 2017-10-02T07:18:00.720Z
Answers.UserDisplayName: Jeff Fulton
Answers.Body: <p>In most cases, the best place to store CSS is in a publicly accessible directly, not managed by Craft at all. Such as:</p>
  
  <pre><code>public/assets/css/master.css
  </code></pre>
  
  <p>Storing your CSS and other front-end assets outside of Craft reduces the overhead of accessing those files. While Craft allows you to store css files in your Craft templates folder, there is additional overhead to access those files as they need to be processed by Craft.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-29T22:05:40.120Z
Answers.LastActivityDate: 2017-09-29T22:05:40.120Z
Answers.UserDisplayName: Ben Parizek
Body: <p>I'm trying to figure out the best place to keep my one master CSS file in craft.</p>
  
  <p>I had the CSS linked in my template as</p>
  
  <p><code>link rel="stylesheet" href="../craft/css/master.css"&gt;</code></p>
  
  <p>But now Blog entries can't get to it, as they are looking in <strong>www.domain.com/index.php/blog/craft/css/master.css</strong> now.</p>
  
  <p>Is there a better place to put the CSS, or a better way to link to it in templates?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-29T22:05:29.307Z
Comments.Text: Are you referring to the site's CSS or like special CSS you wrote to edit the way something looks in the CMS?
Comments.UserDisplayName: Ryan
Tags: <css>
Title: What is the optimal place to store CSS files?
ThreadText: # What is the optimal place to store CSS files?
  
  (Asked by: username_0 on 2017-09-29)
  
  I'm trying to figure out the best place to keep my one master CSS file in craft.
  
  I had the CSS linked in my template as
  
  `link rel="stylesheet" href="../craft/css/master.css">`
  
  But now Blog entries can't get to it, as they are looking in **www.domain.com/index.php/blog/craft/css/master.css** now.
  
  Is there a better place to put the CSS, or a better way to link to it in templates?
  
  **Tags:** css
  
  > **Comments:**
  > **username_1**: Are you referring to the site's CSS or like special CSS you wrote to edit the way something looks in the CMS?  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_4 on 2017-09-29. Score: 11 | Accepted answer
  
  In most cases, the best place to store CSS is in a publicly accessible directly, not managed by Craft at all. Such as:
  
  ```
  public/assets/css/master.css
  
  ```
  
  Storing your CSS and other front-end assets outside of Craft reduces the overhead of accessing those files. While Craft allows you to store css files in your Craft templates folder, there is additional overhead to access those files as they need to be processed by Craft.
  
  
  ---
  
  ### Answer by username_2 on 2018-06-23. Score: 2
  
  I had a similar issue...my Craft3 blog pagination was losing the link to my *main.css* file after the first page, so all content would show but styling disappeared after the main blog index page. As suggested above, I now have my css.main in `/web/css/main.css`, and all of the pagination and styling works perfectly.
  
  
  ---
  
  ### Answer by username_3 on 2017-10-02. Score: 1
  
  As Ben said, you want them in the public folder. Also, you may want to use the Twig tag `{% includeCssFile ...%)` instead of the HTML `<link rel="stylesheet" ...>`.
  
  It outputs the same way, but it works better once you start having different template folders on your site. Documentation can be found here: <https://craftcms.com/docs/templating/includecssfile>
  
  > **Comments:**
  > **username_0**: I didnt know about the includeCSSFile. I ended up changing my css src to ../public/master.css so that all my other templates could access it  
  
  ---
  
  