By: Richard Igoe 07/22/2001
Web Site: TheWebsEye
One important aspect of good design is to give your site
a theme and coherence. A great deal of this can be done
using a 'cascading style sheet.'
Using stylesheets is not difficult. In fact it makes the
task of designing a Website that much easier. However
many new designers don't use them.
But before dispelling some of the confusion, let us look
at the advantages of using CSS - cascading style sheets.
- You can use an external stylesheet to control the
look and appearance of your whole Website, such as
the font size, style, and color, the background image,
the background color, etc... by changing a single
file. You don't need to edit every page.
- Linking to a stylesheet reduces the size of your
Web pages and gives you much cleaner HTML code because
you don't need to specify the font, color, or "style"
of every element on your page.
- Web pages are displayed differently on different
browsers and platforms. For example a 10pt font looks
fine on a PC but becomes too small on a Mac. You can
use a browser-detection script in the header of your
pages which will link to a different stylesheet depending
on which browser is being used.
The rest of this article assumes you have a basic understanding
of HTML tags, the code behind your Web pages. If not you
can get our simple HTML tutorial at http://www.theWebseye.com/HTML.htm
Now using stylesheets is actually easier than HTML. The
main cause of confusion is that you can either link your
Web pages to an external stylesheet, or you can include
the style sheet in the header of individual Web pages
inside STYLE tags. Web design software does not always
make this clear unless you read the HELP pages in detail.
Forget your Web design software for a moment, because
it is easier to understand stylesheets if you take a look
under the surface.
(continued on next page...) |