If i place my css file in a folder called css and link to them in my html none of my styles or images load. If I move the file out to the htdocs folder and change the links in the html it works fine.
What do I need to enter for the path if I have my css files in a seperate folder. i had it as “css/name.css”
Now the issue is when the css files calls on an image in the image folder or a font in the font folder it doesn’t load them. The normal url(“…/images/name.png”) doesn’t work and I also tried url(“/…/images/name.png.”) also not working. Any ideas on how to call the folder thats one level back?
Sorry the 3 dots was a typo. In the actual code it is two dots. Don’t assume because you saw an extra “.” I didn’t google for hours. The issue persists with any code that is located in a folder. The code works 100% correctly when run locally and using the same exact file structure.
I currently don’t have any suitable devices to check your site’s codes, but it’s possible that some files was too big and get deleted. This is usually the case for fonts, and sometime images. Please make sure the files you wanted to use is located in the correct folder.
Everything else seems to work well, for example the background images you have configured in other places of your site are applied, so if any issues persist I’d recommend checking the CSS syntax in the places where this occurs, and if you can’t find anything wrong, send a link to where it happens so we can check it out.
@ChrisPar. Thanks for looking. I was able to get everything working by moving the styles for the images and fonts out of the css and into the html. I’ll fix that typo now. But sadly, the site doesn’t work when everything is in its “correct” place using a cleaner file structure. Later today I am going to swap everything back to the file structure I want to use and try and resolve the issue.
Ok I have reloaded the original code. The issues are down to background image on games page bggames.png not loading, as far as I can tell the URL is correct, it does work fine locally. The fonts on the Lapis Papyrus Scalpellus are not loading either, also the links seem correct, and they also work fine locally. In Dev tools I can see a 404 error for the fonts (which makes no sense to me) and I see a (failed) net::ERR_INTERNET_DISCONNECTED on the games background (bggames.png).
some more info. I am seeing in devtools the wrong css
If I change it here to the correct
It loads fine. But the css file on the host is correct.
I’ve tried it on multiple devices and from different internet providers. all with the same results to that leads me to believe the issue is with Infinityfree. I could be wrong, but I am stumped.
I had a look, and the issue @ChrisPAR pointed out is still in place.
If your CSS file is invalid, browsers will not be able to parse it correctly, and most likely nothing will work.
Which page and CSS file is this exactly? Every page has a unique CSS file. Which is fine, but if you then talk about “the css” of your site, it doesn’t say much.
I generally don’t check videos, but I understand the issue.
Please make sure to clear the cache at Cloudflare too. Cloudflare will cache static files, such as CSS. When working on your site, please consider enabling Development Mode in Cloudflare so changes are visible instantly.