I am trying to build my site but i face this problem and for two days i tried to solve it but i failed . the browser refuse to apply css page only for this page while another pages in my site work fine with css this is my code for problem page
<!DOCTYPE html>
<html lang="en">
<head>
<%include partails/head %>
<link rel="stylesheet" href="../stylesheets/resultPage.css"/>
</head>
<body>
<% include partails/header %>
<h3 class="h3 mb-3 font-weight-normal text-center" id="title">نتيجة
الأختبار</h3>
<div class="container">
<div class="row">
<div class="col-md-10">
and this is my app.js code to upload css file
app.use(express.static("public"));
app.set("view engine" , "ejs");
app.use(bodyParser.urlencoded({extended: true}));
app.use(bodyParser.json())
app.use(methodOverride("_method"));
and this is my file path
- Samples10
- public
- stylesheets
- resultPage.css
- stylesheets
- View
- resultPage.ejs
- public
and last thing this is the text error i got from browser
Refused to apply style from 'http://localhost:3000/result/5b31bbcacc2864263d40d240/stylesheets/resultPage.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
please can anyone help ? Thank you