6

I put my CSS file inside public/css folder. I added CSS file in head section like below.

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

But CSS is not working.

4 Answers 4

5

This is working for me in Laravel 8 (make sure your files are in the public folder)

<link href="{{ asset('css/app.css') }}" rel="stylesheet">
Sign up to request clarification or add additional context in comments.

Comments

4

In Laravel 8, make sure your files are in the public folder and reference them like this:

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

Comments

3

I don't see why you can't just use a relative URL like:

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

Comments

0

Below worked for me.

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

1 Comment

make sure you have css files under public folder.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.