Github pages tailwind not applying styles

i have installed tailwind and in localhost the website works fine but in github pages the styles are not being applied
7 Replies
Jochem
Jochem10mo ago
both this and your Vercel post need a lot more info for people to be able to help. right now, it's just gazing into a crystal ball. best guess would be that you're using the wrong path reference in your link rel=style if you link the site where it doesn't work, someone might be able to tell you what's going wrong
Jimster
JimsterOP10mo ago
i dont think this is the problem because in localhost it work fine how would that help
Jochem
Jochem10mo ago
right now you're walking into a garage and telling the mechanic your car doesn't work, and nothing else basically, if you want someone to figure out what's wrong, you'll have to show the thing that's broken for them to be able to help
Jimster
JimsterOP10mo ago
GitHub
GitHub - web-dev-pr0/2-vanilla-portfolio
Contribute to web-dev-pr0/2-vanilla-portfolio development by creating an account on GitHub.
Jimster
JimsterOP10mo ago
hope that helps
Jochem
Jochem10mo ago
you have this:
<link rel="stylesheet" href="/docs/output.css" media="">
<link rel="stylesheet" href="/docs/output.css" media="">
on https://web-dev-pr0.github.io/2-vanilla-portfolio/ That path means that the browser will look at the root of the current path, which is https://web-dev-pr0.github.io/, then try to open a docs folder, and then open the output.css file Your deploy takes the docs folder and deploys it to https://web-dev-pr0.github.io/2-vanilla-portfolio/, which is where both index.html and output.css live. The solution would be to change your link rel="stylesheet" to:
<link rel="stylesheet" href="output.css" media="">
<link rel="stylesheet" href="output.css" media="">
so like I said, it's an issue with the path of your link to your CSS
Jimster
JimsterOP10mo ago
thank you so much it worked, this took forever
Want results from more Discord servers?
Add your server