I'm a newbie to Craft and am working with a raw version of Craft CMS 2.6.2903 on localhost and am trying to understand some of the basics. The problem that I am encountering at the moment is to do with the Twig includeCssFile command.
I want to create a folder that will contain all my CSS details, so I went to _layout.html and moved all the CSS script from between the style tags into a new script which I saved at craft/templates/styles/index.css. I then deleted the style tags from _layout.html.
I added this line to the <head> section of the _layout.html script:
{% includeCssFile "styles/index.css" %}
So that the <head> section looked like this:
<head>
<meta charset="utf-8" />
<title>{% if title is defined %}{{ title }} - {% endif %}{{ siteName }}< /title>
<link rel="home" href="{{ siteUrl }}" />
{% includeCssFile "styles/index.css" %}
</head>
and once again the Home page worked perfectly.
The problem occurred after I moved the whole styles folder up one level (i.e. to the same level as the templates folder).
I changed the calling code to {% includeCssFile "../styles/index.css" %} and refreshed the home page and had lost all the page styling. I played around with removing the '../' and changing it to './' and even '/' but it still didn't work. When I returned the styles folder to the templates folder, it all worked okay again.
There have been a couple of similar questions already posted on this group, but they haven't resolved my problem (link 1, link 2)
Can someone please tell me what I need to do?