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
Keith Colleluori
9,577 PointsIncluding Bootstrap via Composer twbs/bootstrap
I have been trying to link my style sheet from within Slim to the Bootstrap directory in vendors, and been failing. For now so I can move on with my life I just copied the file into a css directory I have and have been able to link that.
So the folder structure to the bootstrap is /vendor/twbs/bootstrap/dist/css/bootstrap.css
I can link to my style sheets effectively this way. href="css/myfile.css"
That means the directory css is adjacent to /public/
I was confused for a while because I was trying to go back from /public/index.php by trying ../css/myfile.css but since my root is public it seems I don't have to do that. I have tried:
href="vendor/twbs/bootstrap/dist/css/bootstrap.css"
href=__DIR__. "/vendor/twbs/bootstrap/dist/css/bootstrap.css"
href="../vendor/twbs/bootstrap/dist/css/bootstrap.css
and several other I can't currently think of. Am I missing something? Whats the deal here... (I'm also using twig)