How to use css styling in html with multiple directories?
<p>I'm trying to make a simple webapp using Google Appengine with Python, HTML, and CSS. I know that to put a .css styling from separate file into html one should use a link tag, however I can't seem to get it to work. Here is the general directory config:</p>

<p>Main<br>
âââ app.yaml<br>
âââ files.py<br>
âââ Folder<br>
â   âââ files.py<br>
â   âââ Templates<br>
â   â   âââ form.html<br>
â   âââ Static<br>
â   â   âââ style.css<br></p>

<p>"form.html" contains the layout and "style.css" contains styling. I tried putting in the code from "style.css" directly into "form.html" with a style tag and it worked, however when I use the link tag in the head section of the html file it doesn't work. Here is what link tags I tried so far:<br></p>

<pre><code>&lt;head&gt;
    &lt;link type="text/css" rel="stylesheet" href="/Static/style.css"&gt;
    &lt;title&gt; ... &lt;/title&gt;
&lt;/head&gt;
</code></pre>

<p>or<br></p>

<pre><code>&lt;head&gt;
    &lt;link type="text/css" rel="stylesheet" href="/Folder/Static/style.css"&gt;
    &lt;title&gt; ... &lt;/title&gt;
&lt;/head&gt;
</code></pre>

<p>or<br></p>

<pre><code>&lt;head&gt;
    &lt;link type="text/css" rel="stylesheet" href="/Main/Folder/Static/style.css"&gt;
    &lt;title&gt; ... &lt;/title&gt;
&lt;/head&gt;
</code></pre>

<p>None of these work, what could be a solution?</p>

<p>You need a url handler in your app.yaml:</p>

<pre><code>- url: /Static 
  static_dir: Static/
  secure: optional
</code></pre>

<p>I am not sure about your directory tree.  If Static is nested inside Folder, then it would be:</p>

<pre><code>- url: /Folder/Static 
  static_dir: Folder/Static/
  secure: optional
</code></pre>

<p>Or, if Static is nested inside Folder, and you want to simplify your html links, then:</p>

<pre><code>- url: /Static  # &lt;== what url to handle
  static_dir: Folder/Static/  # &lt;== where to point that url
  secure: optional
</code></pre>

<p>and you can access by:</p>

<pre><code>&lt;link type="text/css" rel="stylesheet" href="/Static/style.css"&gt;
</code></pre>

python html css google-app-engine