I'm trying to navigate to a stylesheet and I've tried many options but none are working.
(/stylesheets/main.css)
(../stylesheets/main.css)
(./stylesheets/main.css)
My file tree looks as thus:
V1(root)
---- >public
-------- >img
------------ logo.png
-------- >stylesheets
------------ main.css
---- >views
-------- >partials
------------ header.ejs
------------ footer.ejs
-------- landing.ejs
I am including my header.ejs
to landing.ejs
Here is the code I'm using:
header.ejs
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Event Ticketing</title>
<link rel="stylesheet" href="/stylesheets/main.css">
</head>
landing.ejs
<% include ./partials/header %>
<h1>Landing Page</h1>
When I try to render the landing view I'm not getting any styles linking through at all. I think the path is incorrect but have no idea how to link it.
via Justin
No comments:
Post a Comment