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 add style in 404 page? #1995

Closed
zhaozhiming opened this issue Sep 2, 2017 · 3 comments
Closed

How to add style in 404 page? #1995

zhaozhiming opened this issue Sep 2, 2017 · 3 comments

Comments

@zhaozhiming
Copy link

zhaozhiming commented Sep 2, 2017

Hi, I add a 404.js in src/pages/ and it work, but I found the styles in pages no working.
How can I add style with the 404 page? Thanks.

image

@dvzrd
Copy link
Contributor

dvzrd commented Sep 2, 2017

If your css dir is in root and not src, you need to update your import path to something like this: ../../css/404.css'

@zhaozhiming
Copy link
Author

@dvzrd Thanks, but my css file is in the src folder.

image

@zhaozhiming
Copy link
Author

zhaozhiming commented Sep 2, 2017

I finally found the problem. The reason is my class name start with number (something like 404-outter, so it is no working.
When I change the class to normal word (something like not-found-outter) and everything is ok.
It is a stupid mistake 😂.

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