LoudEye
LoudEye

Reputation: 37

Putting Custom CSS into Laravel 6

I put my css in the public folder and linked to it in my template, but the css won't work. When I run the file out of Laravel using HTML index, it works fine. But, when I put it in Laravel it won't see the css.

This is my code in the template:

<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/media.css">

Do I need to add anything to make it blade/laravel specific?

Upvotes: 0

Views: 1586

Answers (3)

LoudEye
LoudEye

Reputation: 37

Turns out, it was a browser issue. All of my css and links were correct and the files were in the correct location. It worked in Safari, but not in Firefox. I had to correct a few things on my preferences in Firefox.

Upvotes: 0

jascar_destin
jascar_destin

Reputation: 184

can you confirm the CSS files are not reached by the browser ? If not, maybe the css folder is not in your public folder : public/css/style.css This way it should works fine.

Upvotes: -1

Reza Sheykhi
Reza Sheykhi

Reputation: 797

use asset like this:

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

read this for more info!

Upvotes: 2

Related Questions