First of all, to dispel any misinformation that is apparently still going around on the Internet (and, I, too, once believed this when I was first introduced to CSS), CSS is not capable of inserting content into your pages. CSS cannot be used to create headers and/or footers to be used on every page of your site.
For those of you looking for ways to use the same menu on every page of your site, and keep that menu in a single location so that it’s easy to update, CSS won’t do that for you. That’s what server side includes are for, actually. Server side includes can be used with pure HTML (provided that includes are enabled on your server), with PHP, Perl, ASP or basically any other server-side language.
In fact, CSS does almost the opposite. CSS is intended to separate the content from the design within a Web site. CSS is strictly intended to facilitate the “look” of the pages on your Web site. No content is interpreted from CSS.
Now, for the quick lesson on how CSS works.
First of all, we should examine the name. CSS is an abbreviation of the phrase “cascading style sheets”. Let’s pick that apart for a moment.
- items that overlap, with each new item taking precedence over the previous
- refers to the particular look or appearance of a specific item
- figuratively, this is intended to refer to a collection of items gathered together in a single location, like a sheet of music