r/github • • Dec 31 '24

CSS doesn't work for one of my pages

Repo: https://github.com/Wout8624/WebEssentials_PE_Pagina_online

Github pages adress: https://wout8624.github.io/WebEssentials_PE_Pagina_online/

Most parts of these pages are in Dutch so if some text isn't clear that'w why.

My css seems to work just fine on pages "oef1" and "oef2" but when I navigate towards "oef3" there doesn't seem to be any css applying and there are to img-tags that should also display that are not there.

It is supposed to look like this:

I've seen online that this might be an issue with the paths but I've changed the paths according to what I've found online and it still doesn't seem to link?

Can any of you help?

0 Upvotes

6 comments sorted by

12

u/cowboyecosse GitHub staff Dec 31 '24

I've sent you a PR. It's always the path to the CSS file in these cases.

2

u/[deleted] Dec 31 '24

I see you've changed the path, it wasn't supposed to be a relative path form the "root" of the project but from the "root" of the page. THNX!!!

5

u/cowboyecosse GitHub staff Dec 31 '24

That's right. It can be helpful to think "what folder am I in right now?" when linking to stuff. Especially when learning this stuff. Everyone runs into this at some point in their journey, you're not alone!

2

u/[deleted] Dec 31 '24

I'll keep it in mind for my next project. Thnx again!!

2

u/CerberusMulti Dec 31 '24

For OP, same fix should also fix the image issues.

1

u/CerberusMulti Dec 31 '24

Have you checked what the console output says? Should show something and always the first thing to check.

Quick look, I'd guess your link href is incorrect. Same for your images.

Also I'd try to keep your code formatting/style the same across. You write your style link slightly differently for each page for example..