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>I'm not 100% sure from your file diagram, but I think you're not referencing the CSS file properly in the link tag.</p>

<p>If the two files are in these spots:</p>

<p>Main/Folder/Templates/form.html</p>

<p>Main/Folder/Static/style.css</p>

<p>Then in the HTML, your link tag will need to be</p>

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

<p>Because relative to the form.html file, you need to back up a directory to the 'Folder' dir before you add the Static path to the end there...</p>

<p>In any case, generally you don't need a slash at the start of the path containing the CSS unless you are entering the absolute path all the way from the root</p>

python html css google-app-engine