How to Create One CSS File for Your Entire Website
Create your file., Add comments to separate the styles for different pages., Make use of the "id" or "class" element in HTML., Put your universal elements near the top of the page. , Put the unique styles below the comment line for your selected...
Step-by-Step Guide
-
Step 1: Create 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". -
Step 2: Add 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. , This is essential if you want to separate unique elements. ,, As a reminder, a CSS comment looks like this: /*Comment Here*/. , -
Step 3: Make use of the "id" or "class" element in HTML.
-
Step 4: Put your universal elements near the top of the page.
-
Step 5: Put the unique styles below the comment line for your selected page.
-
Step 6: Enjoy the convenience of your one CSS file!
Detailed Guide
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".
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. , This is essential if you want to separate unique elements. ,, As a reminder, a CSS comment looks like this: /*Comment Here*/. ,
About the Author
Isabella Thompson
Committed to making organization accessible and understandable for everyone.
Rate This Guide
How helpful was this guide? Click to rate: