Css style not working in other pages

Styles are not applied on /gallery/index


how are you hosting?

usually seeing both links - repo plus live site makes it easier to troubleshoot.

I am hosting it on c9. I don’t know how to share with you my workspace.

I will try to host it on github pages.

I have hosed it on

It’s not a Jekyll issue. Check the paths to your CSS.

<link rel="stylesheet" href="css/reset.css" type="text/css" />
<link rel="stylesheet" href="css/main.css" type="text/css" />

You likely need something like this instead:

<link rel="stylesheet" href="/css/reset.css" type="text/css" />
<link rel="stylesheet" href="/css/main.css" type="text/css" />

It works on your homepage, but your Gallery page is in /gallery so it’s having trouble locating the assets. The paths you have are looking for /gallery/css/main.css which obviously doesn’t exist. Add the / before and it should resolve.

1 Like

You are right! Thanks :fireworks: