I am rendering a template, that I am attempting to style with an external style sheet. File structure is as follows.
/app
- app_runner.py
/services
- app.py
/templates
- mainpage.html
/styles
- mainpage.css
mainpage.html looks like this
<html>
<head>
<link rel= "stylesheet" type= "text/css" href= "../styles/mainpage.css">
</head>
<body>
<!-- content -->
None of my styles are being applied though. Does it have something to do with the fact that the html is a template I am rendering? The python looks like this.
return render_template("mainpage.html", variables..)
I know this much is working, because I am still able to render the template. However, when I tried to move my styling code from a "style" block within the html's "head" tag to an external file, all the styling went away, leaving a bare html page. Anyone see any errors with my file structure?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…