How to Create One CSS File for Your Entire Website
When making a website, it can be frustrating to have to create a bunch of different CSS files. It gets confusing, annoying, and delaying. Well, you don't have to do that when you can put it all into one file!
Steps
-
1Create your file. Using a program like Adobe Dreamweaver, Microsoft Expression Web, Kompozer or even Notepad, go to the "File" menu and click "New". Give your file a simple name like "style.css".Ad
-
2Add comments to separate the styles for different pages. Of course, there should be universal styles that apply to the entire website, but there are some elements that only apply to a certain page.
-
3Make use of the "id" or "class" element in HTML. This is essential if you want to separate unique elements.
-
4Put your universal elements near the top of the page.
-
5Put the unique styles below the comment line for your selected page. As a reminder, a CSS comment looks like this: /*Comment Here*/.
-
6Enjoy the convenience of your one CSS file!Ad
Warnings
- This can be a great solution that is nearly ideal for smaller websites. For larger websites, the file could turn huge and it could be very inconvenient to find an individual style.
Article Info
Thanks to all authors for creating a page that has been read 69 times.