CSS not working
Unanswered
Bahama Swallow posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
Bahama SwallowOP
I styled my page using CSS, but it doesn't load inside my routes and components
![Image](https://cdn.discordapp.com/attachments/1127022098171306104/1127022098339086406/Screenshot_from_2023-07-07_20-40-44.png)
32 Replies
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Masai Lion
you have already ./global.css
![Image](https://cdn.discordapp.com/attachments/1127022098171306104/1127167713345802310/image.png)
@Bahama Swallow
![Avatar](https://cdn.discordapp.com/avatars/184479429404262410/a_35db4fb943e84d39bb02d6ec0f1d0b7e.gif?size=256)
DirtyCajunRice | AppDir
if you arent using tailwind, you need to actually add your classes to the html. it wont just “pick it upâ€
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
Bahama SwallowOP
yes
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Masai Lion
I think you can not import all css two time
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
Bahama SwallowOP
serious ? how do i do that, it's the same as the documentation, do i have to import the css in every page and style it?
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Masai Lion
do
import styles from "@/styles/your-css.css"
like this you can do
className={styles.theName}
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
Bahama SwallowOP
ok, i try it now, thanks @Masai Lion
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Masai Lion
your welcome
ask if you can't make it
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
Bahama SwallowOP
ok
Is that because I'm not styling the routes or is there something wrong?
![Image](https://cdn.discordapp.com/attachments/1127022098171306104/1127234507309854840/Screenshot_from_2023-07-08_10-46-25.png)
so there is no error
import '@/styles/global.css'
but i cant' use
classname={styles.theName}
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Masai Lion
ok so
globla.css you do not touch it
its de css of all your pages
if you want to create a css only for one page
i recomend you to create a folder named styles and to pout all your css in there
and you import it like you did but with the name of the css
![Image](https://cdn.discordapp.com/attachments/1127022098171306104/1127244951781118042/image.png)
![Image](https://cdn.discordapp.com/attachments/1127022098171306104/1127244977693540422/image.png)
like this
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
Bahama SwallowOP
so i created a css and i have to import in every page? I tried to create a css file for each page and import it as styles, but it gave an error, even though I followed Next's documentation
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Masai Lion
do you wanna voc ? hhaha
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
Bahama SwallowOP
i don't understand what is voc, sorry hahahahha
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Masai Lion
vocal chat haha
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
Bahama SwallowOP
ok, may be tomorrow ?
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Masai Lion
okay
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
Bahama SwallowOP
deal bro