Theborder of an element is simply a line (sometimes more than one) thatsurrounds the content and padding of an element. Thus, the backgroundof the element will stop at the outer edge of the border, since thebackground does not extend into the margins, and the border is justinside the margin. The CSS specification strongly implies that thebackground extends to the outside edge of the border, since it talksabout the borders being drawn "on top of the background of theelement," but not all browsers seem to agree. This is importantbecause some borders are "intermittent" -- for Monday 27th of March 2017 10:20:03 PM

by Eric A. Meyer
ISBN 1-56592-622-6
First edition, published May 2000.
(See the
catalog page for this book.)

Search the text of Cascading Style Sheets: The Definitive Guide.

Table of Contents

Copyright Page
Preface
Chapter 1: HTML and CSS
Chapter 2: Selectors and Structure
Chapter 3: Units and Values
Chapter 4: Text Properties
Chapter 5: Fonts
Chapter 6: Colors and Backgrounds
Chapter 7: Boxes and Borders
Chapter 8: Visual Formatting
Chapter 9: Positioning
Chapter 10: CSS2: A Look Ahead
Chapter 11: CSS in Action
Appendix A: CSS Resources
Appendix B: HTML 2.0 Style Sheet
Appendix C: CSS1 Properties
Appendix D: CSS Support Chart
Index
Colophon
Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.

dark blue, and the statement H2.dkblue {color:maroon;} is a little silly.

From this simple example, we draw the general lesson that whenyou're planning to use styles, it's generally to youradvantage to plan ahead and use all of the tools you can. To take thepreceding example a little further, suppose that a navigational baris added to the page. Within this bar, hyperlinks should be yellow,not dark red. If the bar is marked with an ID of

Example

BODY {background-attachment: scroll;}DIV.fixbg {background-attachment: fixed;}

Values

This sets the background color of an element. The color fills the content areaand padding, and extends out to the outer edge of the element'sborder. The value transparent trips across a nastybug in Navigator 4.x, which interprets it asblack. XML allows you to easily generate XML documents (that contain your information), since it is so structured.
  • XML parsers allow you to code faster by giving you a parser for your all your XML documents (with and without DTDs).
  • XML documents are easily committed to a persistence layer

    XML documents may be stored in files or databases. When stored in files, XML documents are simply plain text files with tags (and possibly DTDs). It is very easy to save your XML documents to a text file and pass the text file around to other machines, platforms and programs (as long as they can understand the data). In the worst case scenario, XML documents (files) can be viewed in a text editor on just about any platform.