Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to include css file #125

Open
mahmudul-elahi7676 opened this issue Oct 31, 2023 · 3 comments
Open

How to include css file #125

mahmudul-elahi7676 opened this issue Oct 31, 2023 · 3 comments

Comments

@mahmudul-elahi7676
Copy link

mahmudul-elahi7676 commented Oct 31, 2023

How to include css file in base.html

I created style.css file in public/assets/css/style.css

i want to link this file into base.html

If i include /assets/css/style.css this way

then in /home route it worked
But if i use /product/create then it doesn’t work

@daveh
Copy link
Owner

daveh commented Oct 31, 2023

You need to start the path with a slash so it's route relative:

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

@mahmudul-elahi7676
Copy link
Author

You need to start the path with a slash so it's route relative:

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

Not working brother

@daveh
Copy link
Owner

daveh commented Oct 31, 2023

Are you running the code in a subfolder? Then you need to include that too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants