Reputation: 1518
I have a basic index.html file in a folder, as well as many, many other files. I want them all to use the same CSS file, without having to manually add to every file. I was wondering if you renamed the file index.css or something like that it would automatically load into every HTML file in the folder? Out of curiosity, is there also a Javascript method for this too?
Upvotes: 0
Views: 337
Reputation: 355
You can't do that with simple HTML.
Do a PHP template instead, basically with:
head
header
nav
menufooter
Then, include your HTML/PHP page in your content.
For instance, use $_GET or $_POST to know which page to include.
Upvotes: 1
Reputation: 1486
Bad news my friend No. There is no magical tool that will import the CSS into all of your files. You have to do it yourself. Also it's really easy
See it's that easy. Was it so hard to do it?
Upvotes: 1