Created folders to organise my html files, but PG has added a unique 'styles.css' to each one?!

How do I get them all to share a ‘master’ styles.css or whatever else named .css file I have and why did it create new styles.css files in each folder?

I created folders as seen in the image above to organise my project and keep it cleaner.

But after doing that, saving and reloading the project, I now see this:

Can I please get some help on this?

You will need to update the stylesheet path when pages are nested. You current relative path on the .html pages inside the folders is most likely: <link href="style.css" rel="stylesheet">while for the pages nested in folders it should go up to the parent directory (root directory). Just add a double dot notation: <link href="../style.css" rel="stylesheet"> This will solve the issue of creating seperate CSS files in each folder.

1 Like

Thank you!

So may I assume that PG created these extra files when I copied my htmls into these folders but before I could manually change their styles.css paths? If so, how can I turn that off, because I knew I had to change the paths myself and I don’t need something creating files I have to delete.

If PG wanted to be cute, then it could have asked “Do you want the paths updated or do you want new .css files for each folder or don’t do anything”and I would have had a choice, but this auto creation is quite annoying and confusing.

I think its very cute and clever of PG to create the file for you on save as you have asked for it in the HTML markup.

And there’s the rub - I DIDN’T ask for anything. Moving a file into a folder in FINDER and reopening PG shouldn’t auto create things, at the very least, without informing the user and giving them a choice.