title: express-handlebars template not loading CSS styling on static routes
body: <p>I have a set of different routes all using the same template <code>main</code>, but any route is only one <code>/</code> away from the base route applies the CSS but anything beyond that will not include it.</p>
  
  <p>So <code>app.get('/profile</code>) will render with the CSS, but <code>app.get('/profile/edit')</code> does not. </p>
  
  <p>I am unsure as to why this is not working, as far as I understand this line should apply to all routes set below it.</p>
  
  <p>In server.js</p>
  
  <pre><code>  app.use(express.static(__dirname + "/public"));
    //Many different routes
    //...
    //...
  
      //renders with CSS successfully
      app.get("/profile", (req,res) =&gt; {
        res.render('profile', {
          layout: "main",
          cause: {
            title: title
          },
          csrfToken: req.csrfToken
        });
      });
  
   //this is the route that renders without CSS
      app.get("/profile/edit", (req,res) =&gt; {
        res.render('edit', {
          navItems: [
            {name: 'See your fellow supporters',
            link: "/signatures"}
          ],
          layout: "main",
          cause: '',
          csrfToken: req.csrfToken
        });
      });
  </code></pre>
  
  <p>Handlebars templates</p>
  
  <pre><code>   //edit.handlebars
      &lt;h2&gt;Change your details&lt;/h2&gt;
      &lt;form method="POST"&gt;
      &lt;input type="text" name="firstName" placeholder="first name"&gt;
      &lt;label for="firstName"&gt;First Name&lt;/label&gt;
  
      &lt;input type="text" name="lastName" placeholder="last name"&gt;
      &lt;label for="lastName"&gt;Last Name&lt;/label&gt;
  
      &lt;input type="email" name="email" placeholder="e-mail"&gt;
      &lt;label for="email"&gt;E-mail&lt;/label&gt;
  
      &lt;input type="password" name="password" placeholder="password"&gt;
      &lt;label for="password"&gt;Password&lt;/label&gt;
  
      &lt;input type="text" name="age" placeholder="age"&gt;
      &lt;label for="age"&gt;Age&lt;/label&gt;
  
      &lt;input type="text" name="city" placeholder="city/town"&gt;
      &lt;label for="city"&gt;City or Town&lt;/label&gt;
  
      &lt;input type="text" name="homepage" placeholder="homepage or social media"&gt;
      &lt;label for="homepage"&gt;Homepage&lt;/label&gt;
  
      &lt;input type="hidden" name="_csrf" value="{{csrfToken}}"&gt;
      &lt;input  id="formButton" type="submit" name="submit" value="Update"&gt;
    &lt;/form&gt;
  
  
  //profile.handlebars
            &lt;h2&gt;Let people know that you support: {{&gt;cause}}&lt;/h2&gt;
        &lt;form method="POST"&gt;
          &lt;input type="text" name="age" placeholder="age"&gt;
          &lt;input type="text" name="city" placeholder="city/town"&gt;
          &lt;input type="text" name="homepage" placeholder="homepage or social media"&gt;
          &lt;input type="hidden" name="_csrf" value="{{csrfToken}}"
          &lt;input  id="formButton" type="submit" name="submit" value="continue"&gt;
        &lt;/form&gt;
  </code></pre>