Forums

Css not loading on my single page flask website

Hi I'm a super beginner. I created my single page flask website (3.6) and then created a main.css file in the same directory as flask_app.py. I then put the following code for css but its not loading. dont know what am I doing wrong here

return '''
    <html>
        <head>
            <title>My website</title>
            <link rel="stylesheet" href="main.css">
        </head>
        <body>
            <header>
              <div class="container">

Have you set things up so that your static files (eg. CSS files, JavaScript, and so on) are being served up? See this help page.

Sorry giles the article speaks what static files mapping is but I couldn't find anywhere how to do this. Where do I map my static files?

Also we are using Flask. I believe the article is about Django. please correct me if I'm wrong here

No, it's not about Django. It has one link in it that goes to another page that has Django-specific config in it. You create static files mappings on your web app configuration page.