untitled

(John Hannent) #1

2 CSS Web Design For Dummies


the HTML code. Or you can even put your CSS style rules in entirely separate
files. A Web page’s HTML resides in one file. It merely includes a link specify-
ing the location of the independent CSS file that contains the style rules
(how a Heading 1 headline or paragraph elements are supposed to look,
where they’re positioned, how big they are, what texture underlies them, and
so on).

If you’re a designer working on a Web page with a programmer, it’s more
efficient for you to separate your code from the programmer’s HTML or
script code. A designer can work on an external CSS style sheet, rather than
wading through the programmer’s HTML files and trying to manage style
attributes embedded within the HTML code. The HTML programmer will
appreciate this, and so will you, the CSS designer. No more stepping on each
other’s toes.

Of course, many Web sites are designed by a single person wearing many
hats: HTML, script, and CSS can all be written by one talented individual. This
book doesn’t neglect that audience. Most of the CSS examples in this book
are contained within HTML pages, demonstrating how the entire page works
in harmony. You can just load the book’s examples into your browser and see
the delightful results immediately. An entire chapter is even devoted to
scripting, so that you can get your feet wet with interactive dynamic CSS
effects as well.

Benefiting from the Cascade ..........................................................................


CSS offers various kinds of benefits. For example, a single style sheet can cas-
cadeits effects through all the pages in a Web site. One side of effect of this is
that if you decide to change your site’s default body font from Arial to Times
New Roman, you need make that change only once within the style sheet,
rather than hunting down all the attributes throughout the entire set of HTML
code files that make up your site. Another benefit of using CSS is that the style
sheet only needs to be downloaded once to the user’s computer. Thereafter,
it’s called up from a local cache, resulting in smaller HTML pages. Your Web
pages load faster into the user’s browser — still a major consideration for the
60 percent or so of online Americans who still don’t have broadband high-
speed Internet connections.

If you’ve already worked with CSS, this book will sharpen your skills and
show you lots of new techniques. You’ll take your Web design to the next
level. If you’re new to CSS, you’re in the right place: You’ll find just what you
need here to build unified, attractive, inviting Web sites.

This book shows you, the CSS designer, how best to exploit, expand, adminis-
ter, and write code for Web pages. The book covers all the essentials of CSS,

03_584251 intro.qxd 2/10/05 11:14 PM Page 2

Free download pdf