Why isn’t my view presenting the css design?

Asked

Viewed 36 times

0

<html>
<head>
  <link href="/css/app.css" rel="stylesheet">
  <title>Controle de estoque</title>
</head>
<body>
  <h1>Listagem de Produtos</h1>
  <table class="table">
  <?php foreach($produtos as $p): ?>
  <tr>
    <td><?= $p->nome ?></td>
    <td><?= $p->valor ?></td>
    <td><?= $p->descricao ?></td>
    <td><?= $p->quantidade ?></td>
  </tr>
 <?php endforeach ?>
  </table>
 </body>
 </html>

2 answers

1

Because the path is wrong. If you are using the files from css in the public folder (which is recommended) you should add as follows:

<link href="{{ asset('css/app.css') }}" rel="stylesheet" type="text/css"/>

1

Maybe you are not shown the correct path to the file. try this.

<link href="../css/app.css" rel="stylesheet">

it is always good to clear the browser cache too :)

  • did not solve. I am using the Laravel 5.5, and it seems that it does not come installed some things, will that be why?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.