Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Creating a Project Pages Site

Erin Hewett
Erin Hewett
3,855 Points

I pushed my website to GitHub pages and now my CSS styles no longer work.

My CSS stylesheet works fine on my local computer, but now that I pushed it to GitHub pages, the styles don't show up. I can see the stylesheet in the GitHub repository, but I can't tell why it is not working. Does the path somehow change. This is what I have in my index.html

<link rel="stylesheet" href="css/style.css"  type="text/css"/>
Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

I can't see any code posted here. Make sure you're using relative paths for the links to your css.

Seth Kroger
Seth Kroger
56,413 Points

It would help if you give us a link to your repo so we can see how the files are arranged.

Erin Hewett
Erin Hewett
3,855 Points

It worked fine locally. Does pushing it to GitHub pages change the path somehow?

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Your CSS folder is in all uppercase. Your files link to css in lower case. File paths are case sensitive.

Seth Kroger
Seth Kroger
56,413 Points

File names and paths are case-sensitive in Unix/Linux but not Windows. It's something to keep in mind if you're editing your sites on a Windows PC because the hosts you deploy the actual site to are almost always Linux systems.

Erin Hewett
Erin Hewett
3,855 Points

Thank you Jennifer! That didn't even occur to me since it's not that way everywhere.

Thanks Seth. That's good info to know. I'm definitely a Windows person.