Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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,392 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,392 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.