Welcome
The bestselling DHTML and CSS for the World Wide Web has been updated for its 3rd Edition to include new dynamic techniques, advanced CSS Layout techniques, updated compatibility charts for Opera and Safari, and an expanded list of browser safe fonts.
This Web site is to be used along side of the book to provide readers with feedback to questions, a place to download resources, and an interface for vewing all of the code found within the book. To get started, use the menu to the left.
DHTML and CSS for the World Wide Web is now available from finer bookstores (on and off line) everywhere:
- Peachpit Press
- Amazon.com
- Amazon.co.uk
- Barnes and Noble
- Bookpool.com
- Books-A-Million
- WH Smith
- Powles
Also Available...
DHTML and CSS Advanced is now available. This advanced book picks up where the Visual Quick Start Leaves off, helping you master CSS and DHTML.
- Planning your interactive Web site
- Advanced Dynamic techniques for content, navigation, page controls and more
- The latest layout techniques to break the tables habit
- Work with XML, PHP, and MySQL to add database information
Site Hosted By:
Jet-Screamer (www.jet-screamer.com)• website hosting plans
Welcome | Introduction
Once upon a time creating Web pages was no more difficult than using a word processor. You learned a few tags, created a few graphics, and presto: Web page. Now, with streaming video, JavaScript, CGI, Shockwave, Flash, and Java, the design of Web pages may seem overwhelming to anyone who doesn't want to become a computer programmer.
Enter Dynamic HTML (DHTML) and cascading style sheets (CSS), technologies that give you---the Web designer---the ability to add pizzazz to your Web pages as quickly and easily as HTML does. With DHTML, you don't have to rely on plug-ins that the visitor might not have---or rely on complicated programming languages (except maybe a little JavaScript). For the most part, DHTML is created the same way as HTML and requires no special software.
That's what this book is about: How to create attractive Web layouts and interactive Web pages as simply as possible. This book will not turn you into the ultimate Web-design guru, but it will give you the foundations you need to realize your own Web-design vision.
Welcome | Reviews
The Reviews are In for the 2nd Edition...
Edward Tanguay, Net Language
This book allows you to skim through fast and learn what you don't know yet about CSS and DHTML (why? because what is new on every page is in red -- very nice). I am learning the background I wanted about DHTML. Like other Visual QuickStart Guides, this book is very useful (and not that expensive).
A Book Lovers Book Reviews
This book is an excellent resource for anyone who already knows something about web design and wants to go to the next level. Most of the code provided is very useful and, if implemented at the beginning of design, can save a webmaster a lot of time in site maintenance. Probably the best feature of this book is the prevalent use of pictures, examples and tips to use if you get stuck. The extensive information on browser-specific coding is essential to any webmaster who wants to be cross-browser compatible
Tom Wilson, Information Research
This is a useful introduction to dynamic HTML, with a lot of good advice on what to avoid if you want your pages to be read by any browser.
Michael Simpson
A brilliant book at a reasonable price, very concise and yet understanderable with lots of relevant examples of well tested scripts. The examples given are presented within a well thought out set of categories that make their relevance to website design immeadiately seen.
Amazon Reviewer
This is definitively the best presentation I've seen for beginners and intermediate users. Besides a great reference, it goes beyond the usual "what it is" and gets into how to actually do things you're going to want to do. Each CSS facility is described, an example is provided, and has a quick-reading chart showing which browsers it is (or is not) compatible with.
Errata & FAQ
This section contains questions from readers as well as errors found in the book, so if you run into a problem , check here first, and if you still do not find your answer contact the author.
Book Errata
pg. 306 - Chapter 15 "Making an Object Draggable"
There was a stray line of debugging code left in the downloadable example for the drag and drop code that caused an alert to appear. I've removed the code in the downloads and on-line example.
pg. 384 - Chapter 18 "Creating Sliding Menus"
The code presented for the sliding menu will not work in Internet Explorer for windows. To fix this, simply change the position from menu to "absolute" instead of "fixed":
.menu {position: fixed;}
A test version I was using for other browsers ended up in the final version of the book. In Browsers such as NS6+, Safari, and Opera, using a fixed position allows you to keep the sliding menu always available. However, IE does not recognize fixed at all, thus the whole script fails.
CSS FAQ
Coming Soon
This section will contain questions from readers, so if you run into a problem with the book, check here first, and if you still do not find your answer the author.
DHTML FAQ
Coming Soon
This section will contain questions from readers, so if you run into a problem with the book, check here first, and if you still do not find your answer the author.
Downloads
I hope you'll be using a lot of the code from this book in your Web pages, but watch out: retyping information can lead to errors. Some books include a fancy-shmancy CD-ROM containing all the code from the book, and you can pull it off that disk. But guess who pays for that CD? You do. And CDs aren't cheap. That's why I'm placing the code here for you to download. If you haven't bought the book, shame on you, but go ahead and enjoy the code anyway
In addition to the code, I'm also placing a sample chapter online for those of you still not convinced that you need the book as well as the list of browser safe fonts so that you can print them out to place on your cube wall (like you have a real office!)
Download | Code
You can download the code either as one big chunk or just the code for each of the three parts in the book. All of the code is available in ZIP format, which most PC's and Mac's should be able to use. If you run into any problems, contact me:
Download | Sample Chapter
Coming Soon
Download | Browser Safe Fonts
The tables in this dowloadable PDF version of Appendix E from the book present the fonts that are preinstalled on Windows and Mac computers as they come out of the box as well as the list of the Microsoft Core Web fonts, which are installed by Internet Explorer. The list also includes the styles (bold, bold Italic, or italic) that are available for the fonts, the generic family the font belongs to, and an example of the font. To use these fonts, either pick a font available for both Mac or Windows, or choose similar fonts and list both of them in the font list. Remember that multi-word font names should be in quotes (example: "Andale Mono").
Code Examples
If you want to test the code live from a working Web site, here it all is. Choose a chapter from the list to the left, and then the name of the section or sub-section you want to view and the results of the code are displayed in a seperate window.
Chapter 01 | Understanding CSS
There is no code in this chapter.
Chapter 09 | Understanding DHTML
There is no code in this chapter.
Chapter 02 | CSS Basics
Adding Styles to an HTML Tag
Adding Styles to a Web Page
Adding Styles to a Web Site
(re)Defining HTML Tags
Defining Classes to create Your Own Tags
Defining IDs to Identify an Object
Combining Styles with the Same Rules
Defining Styles in Context
Making a Definition !important
Inheriting Properties from a Parent
Managing Existing or Inherited Property Values
Determining the Cascade Order
Defining Link Colors with Pseudo-classes
Defining Special Cases with Pseudo-elements
Setting Specific Styles for Printing
Adding Comments to CSS
Chapter 03 | Font Controls
Understanding Typography on the Web
Setting the Font
Setting the Font Size
Making Text Italic
Setting Bold, Bolder, and Boldest
Creating Small-caps
Setting Multiple Font Values
Chapter 04 | Text Controls
Adjusting Letter Spacing
Adjusting Word Spacing
Adjusting Line Spacing
Setting Text Case
Aligning Text Horizontally
Aligning Text Vertically
Indenting Paragraphs
Setting Text Color
Decorating Text
Setting Text Direction
Setting Page Breaks for Printing
Chapter 05 | Element Controls
Setting How an Element is Displayed: Inline
Setting How an Element is Displayed: Block
Setting How an Element is Displayed: None
Setting How an Element is Displayed: List
Setting the Width and Height of an Element
Setting Maximum and Minimum Values (Moz Only)
Setting an Element’s Margins
Setting an Element’s Border
Decorating an Element’s Border
Setting and Decorating an Element’s Border
Rounding Border Corners (Moz Only)
Setting an Element’s Padding
Setting the Background
Setting the Background Color
Setting the Background Image
Chapter 06 | Element Position Controls
Setting an Element’s Position Type
Setting Left/Top Position
Setting Right/Bottom Position
Stacking Element’s (3-D Positioning)
Floating Elements in the Window
Clearing Floating
Controlling White Space
Chapter 07 | Element Visibility Controls
Setting an Element’s Visibility
Setting the Visible Area of an Element
Setting where the Extra Content Goes
Setting an Element’s Opacity
Chapter 08 | List, Table, & Interface Controls
Setting Up a List
Setting the Bullet Style for Lists
Creating Your Own Bullet
Creating a Hanging Indent
Collapsing Borders Between Table Cells
Setting the Position of a Table Caption
Changing the Mouse Pointers Appearance
Changing the Scroll-bars Appearance (IE Windows Only)
Chapter 10 | The Document Object Model
Understanding the DOM: Road Map to Your Web Page
Setting up an Object
Understanding Events
Using Event Handlers
Using the DOM
Passing Events to a Function
Binding Events to Objects
Using Feature Sensing
Detecting the DOM Type for Backwards Compatibility
Chapter 11 | Learning About Your Environment
Detecting the Operating System
Detecting the Browser's Name and Version
Detecting the Page's Location and Title
Determining the Screen Dimensions
Determining the Number of Colors (bit-depth)
Determining the Browser Window's Dimensions
Determining the Page's Visible Dimensions
Determining the Page's Scroll Position
Chapter 12 | Learning About an Object
Detecting Which Object was Clicked
Determining an Object's Dimensions
Determining an Object's Position | Left & Top
Determining an Object's Position | Right & Bottom
Determining an Objects 3-D Position
Determining an Object's Visibility State
Determining an Object's Visible Area
Chapter 13 | Learning About an Event
Detecting which Event Type Fired
Detecting which Key was Pressed
Detecting which Modifier Key was Pressed
Detecting which Mouse Button was Clicked
Detecting where the Mouse Clicked
Chapter 14 | Basic Dynamic Techniques
Making Objects Appear and Disappear | Changing Visibility Style
Making Objects Appear and Disappear | Changing Display State
Moving Objects from Point to Point
Moving Object's by Certain Amount
Moving Objects in 3-D
Changing an Object's Clip Area
Changing an Object's Content
Controlling Objects Between Frames
Chapter 15 | Advanced Dynamic Techniques
Making a Function Run Again After a Delay
Animating an Object | Straight Line
Animating an Object | Circular Animation
Making an Object Dragable
Opening a New Browser Window
Moving the Browser Window
Changing the Browser Window's Size
Scrolling the Browser Window
Chapter 16 | Dynamic CSS
Customizing Styles for the OS or Browser
Fixing CSS in Older Versions of Netscape
Reading a Style Defintion's Value
Adding a Style Definition to an Object
Adding a Style Defintion in IE
Changing an Object's Class
Disabling a Style Sheet
Chapter 17 | Content and Layout
Importing External Content | External JavaScript
Importing External Content | iFrames
Adding Dynamically Generated Content
Creating Multi-column Layouts
Styling Tables
Styling Forms
Styling Frames
Creating a Pull Quote
Creating Headlines
Creating a Fixed Header
Creating a Drop Shadow
Chapter 18 | Navagation and Controls
Setting Multiple Link Styles
Creating Image Rollovers with CSS
Adding Pop-up Hypertext
Creating Drop-down Menus
Creating Sliding Menus
Creating Collapsible Menus
Creating a Remote Control
Creating Scroll Bars for a Layer
Using Input From a Form Field
Follow the Mouse Pointer
Creating a Slide Show
Previous Editions
1st Edition (1998) 2nd Edition (2001)Jason Cranford Teague
Contact Bright Eye Media webbedENVIRONMENTSPeachpit Press
Contact Book Web site @ Peachpit Peachpit Press Web SiteOther Books by Jason
DHTML and CSS Advanced SVG for Web Designers Photoshop CS at Your Fingertips Final Cut Pro 4and the Art of Filmmaking Final Cut Express Solutions
![]()