Forum
Linked CSS not loading in folder
In my template I have (among others): <link href="/css/bootstrap-grid.css" rel="stylesheet">
Works great on www.mydomain.com/mypage
But when I have www.mydomain.com/mypage/mysubpage
It doesn't link correctly. It appears it's trying to grab the css file from www.mydomain.com/mypage/css instead of the normal root.
I'm sure it's something really simple. It's just eluding me at the moment.
Perch Runway: 3.0.14, PHP: 7.0.27, MySQL: 5.6.36, with PDO
Are you sure this is what you have?
All your links to CSS files should start with a
/
Yes, I have the forward slash in the link as shown.
Is exactly how it is shown in /perch/templates/pages/default.php
When viewing the source code in the browser, it also shows up exactly like that.
For what it's worth, here's my .htaccess contents.
What errors do you get in the browser console?
Ah, that was the clue I needed. Browser console indicated that the images weren't found. So I added the "/" before the at the beginning of the src for the image and all is good.
thanks for your help.