vendredi 1 juillet 2016

Symfony 3 - {{asset('assets/css/main.css')}} not working

binding a CSS-File should be simple in symfony 3 according to every tutorial and the documentation. But in my case, it just doesn't work.

In my base.html.twig i have

<link rel="stylesheet" href="{{asset('assets/css/main.css')}}" />

while in the folder web/assets/css/ there is a main.css file. But it just doesn't take effect.

Did I do something wrong?

EDIT:

maybe one more info.. when i look at the sourcecode there is a <link rel="stylesheet" href="/assets/css/main.css" /> in the head of the document, but when I click on the link it outputs a No route found for "GET /assets/css/main.css" (from "http://localhost/application/3")

Aucun commentaire:

Enregistrer un commentaire