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 trialRod Garland
22,766 PointsFor some reason my css only loads when it placed within the a CSS folder
When I initially ran the application the only styles that were being applied to the page were the materialize.css styles and not the app.css styles. It was only when I placed app.css within a css folder and updated the stylesheet href on each page is when app.css's styles began to be applied. Can someone tell me why?
1 Answer
Alexander Nikiforov
Java Web Development Techdegree Graduate 22,175 PointsFor that you have to upload project on Github so that anyone can download and reproduce error. I just did the following:
- cloned project from giflib repo
- started boot run: all css worked just fine.
In original project app.css
lies in the src/main/resources/static/app.css:
https://github.com/treehouse-projects/giflib/tree/master/src/main/resources/static
And in the html files in "header", the following line works:
<link rel="stylesheet" th:href="@{/app.css}" />
There should be something with your project...