A.1. Visual MediaA.1.1. backgroundThis is a shorthand method to express all of the individual background properties within a single declaration. Use of this property is generally encouraged over the individual properties, as it has a slightly better support profile in older browsers and doesn't take as long to type.
A.1.2. background-attachmentThis property defines whether the background image scrolls along with the element when the document is scrolled. This can be used to create "aligned" backgrounds; see Chapter 9 for more details.
A.1.3. background-colorThis sets a solid color for the background of the element. This color fills the content, padding, and border areas of the element, extending to the outer edge of the element's border. Borders that have transparent sections, such as dashed borders, will show the background color through the transparent sections.
A.1.4. background-imageThis places an image in the background of the element. Depending on the value of background-repeat, the image may tile infinitely, along one axis, or not at all. The initial background image (the origin image) is placed according to the value of background-position.
A.1.5. background-positionThis property sets the position of the background's origin image (as defined by background-image); this is the point from which any background repetition will occur.
A.1.6. background-repeatThis defines the tiling pattern for the background image. Note that the axis-related repeat values actually cause repetition in both directions along the relevant axis. The repetition begins from the origin image, which is defined as the value of background-image and is placed according to the value of background-position.
A.1.7. borderThis is a shorthand property that defines the width, color, and style of an element's border. Note that while none of the values are actually required, omitting a border style will result in no border being applied because the default border style is none.
A.1.8. border-bottomThis shorthand property defines the width, color, and style of the bottom border of an element. As with border, omission of a border style will result in no border appearing.
A.1.9. border-bottom-colorThis property sets the color for the visible portions of the bottom border of an element. Only a solid color can be defined, and the border's style must be a value other than none or hidden for any border to appear.
A.1.10. border-bottom-styleThis defines the style for the bottom border of an element. The value must be something other than none for any border to appear. In CSS1, HTML user agents were only required to support solid and none.
A.1.11. border-bottom-widthThis sets the width for the bottom border of an element, which will take effect only if the border's style is something other than none. If the border style is none, the border width is effectively reset to 0. Negative length values are not permitted.
A.1.12. border-colorThis shorthand property sets the color for the visible portions of the overall border of an element or sets a different color for each of the four sides. Remember that a border's style must be something other than none or hidden for any border to appear.
A.1.13. border-leftThis shorthand property defines the width, color, and style of the left border of an element. As with border, omission of a border style will result in no border appearing.
A.1.14. border-left-colorThis property sets the color for the visible portions of the left border of an element. Only a solid color can be defined, and the border's style must be something other than none or hidden for any border to appear.
A.1.15. border-left-styleThis defines the style for the left border of an element. The value must be something other than none for any border to appear. In CSS1, HTML user agents were only required to support solid and none.
A.1.16. border-left-widthThis sets the width for the left border of an element, which will take effect only if the border's style is something other than none. If the border style is none, the border width is effectively reset to 0. Negative length values are not permitted.
A.1.17. border-rightThis shorthand property defines the width, color, and style of the right border of an element. As with border, omission of a border style will result in no border appearing.
A.1.18. border-right-colorThis property sets the color for the visible portions of the right border of an element. Only a solid color can be defined, and the border's style must be something other than none or hidden for any border to appear.
A.1.19. border-right-styleThis defines the style for the right border of an element. The value must be something other than none for any border to appear. In CSS1, HTML user agents were only required to support solid and none.
A.1.20. border-right-widthThis sets the width for the right border of an element, which will only take effect if the border's style is something other than none. If the border style is none, the border width is effectively reset to 0. Negative length values are not permitted.
A.1.21. border-styleThis shorthand property can be used to set the styles for the overall border of an element, or for each side individually. The value of any border must be something other than none for the border to appear. In CSS1, HTML user agents were only required to support solid and none.
A.1.22. border-topThis shorthand property defines the width, color, and style of the top border of an element. As with border, omission of a border style will result in no border appearing.
A.1.23. border-top-colorThis property sets the color for the visible portions of the top border of an element. Only a solid color can be defined, and the border's style must be something other than none or hidden for any border to appear.
A.1.24. border-top-styleThis defines the style for the top border of an element. The value must be something other than none for any border to appear. In CSS1, HTML user agents were only required to support solid and none.
A.1.25. border-top-widthThis sets the width for the top border of an element, which will only take effect if the border's style is something other than none. If the style is none, the width is effectively reset to 0. Negative length values are not permitted.
A.1.26. border-widthThis shorthand property can be used to set the width for the overall border of an element or for each side individually. The width will take effect for a given border only if the border's style is something other than none. If the border style is none, the border width is effectively reset to 0. Negative length values are not permitted.
A.1.27. bottomThis property defines the offset between the bottom outer margin edge of a positioned element and the bottom edge of its containing block.
A.1.28. clearThis defines the sides of an element on which no floating elements may appear. In CSS1 and CSS2, this is accomplished by automatically increasing the top margin of the cleared element. In CSS2.1, clearance space is added above the element's top margin, but the margin itself is not altered. In either case, the end result is that the element's top outer border edge is just below the bottom outer margin edge of a floated element on the declared side.
A.1.29. clipThis is used to define a clipping rectangle inside of which the content of an absolutely positioned element is visible. Content outside this clipping area is treated according to the value of overflow. The clipping area can be smaller or larger than the content area of the element.
A.1.30. colorThis property sets the foreground color of an element, which in HTML rendering means the text of an element; raster images are not affected by color. This is also the color applied to any borders of the element, unless overridden by border-color or one of the other border color properties (border-top-color, etc.).
A.1.31. contentThis is the property used to define the generated content placed before or after an element. By default, this is likely to be inline content, but the type of box the content creates can be controlled using the property display.
A.1.32. counter-incrementWith this property, counters can be incremented (or decremented) by any value, positive or negative. If no <integer> is supplied, it defaults to 1.
A.1.33. counter-resetWith this property, counters can be set or reset to any value, positive or negative. If no <integer> is supplied, it defaults to 0.
A.1.34. cursorThis defines the cursor shape to be used when a mouse pointer is placed within the boundary of an element (although CSS2.1 does not define which edge creates this boundary).
A.1.35. directionThis property specifies the base writing direction of blocks and the direction of embeddings and overrides for the Unicode bidirectional algorithm. User agents that do not support bidirectional text are permitted to ignore this property.
A.1.36. displayThis is used to define the kind of display box an element generates during layout. Gratuitous use of display with a document type such as HTML can be dangerous, as it upsets the display hierarchy already defined in HTML. In the case of XML, which has no such built-in hierarchy, display is indispensable.
A.1.37. floatThis defines the direction in which an element is floated. It has traditionally been applied to images to let text flow around them, but in CSS, any element may be floated. A floated element will generate a block-level box no matter what kind of element it may be. Floated nonreplaced elements should be given an explicit width; otherwise, they may tend to become as narrow as possible.
A.1.38. fontThis is a shorthand property used to set two or more aspects of an element's font all at once. It can also be used to set the element's font to match an aspect of the user's computing environment using keywords such as icon. Note that if these keywords are not used, the minimum font value must include the font size and family.
A.1.39. font-familyThis defines a font family to be used in the display of an element's text. Note that use of a specific font family (e.g., Geneva) is wholly dependent on that family being available on a user's machine; no font downloading is implied by this property. Therefore, the use of generic family names as a fallback is strongly encouraged.
A.1.40. font-sizeThis sets the size of the font for an element. Note that it actually sets the height of the character boxes in the font; the actual character glyphs may be taller or shorter than these boxes (usually shorter). Each keyword must be larger than the next smallest keyword and smaller than the next biggest keyword. Negative length and percentage values are not permitted.
A.1.41. font-styleThis sets the font to use an italic, oblique, or normal font face. Italic text is generally defined as a separate face within the font family. It is theoretically possible for a user agent to compute a slanted font face from the normal face.
A.1.42. font-variantThis property is basically used to define small-caps text. It is theoretically possible for a user agent to compute a small-caps font face from the normal face.
A.1.43. font-weightThis property sets the font weight used in rendering an element's text. The numeric value 400 is equivalent to the keyword normal, and 700 is equivalent to bold. Each numeric value must be at least as light as the next lowest number and at least as heavy as the next highest number.
A.1.44. heightThis defines the height of an element's content area, outside of which padding, borders, and margins are added. This property is ignored for inline nonreplaced elements. Negative length and percentage values are not permitted.
A.1.45. leftThis property defines the offset between the left outer margin edge of a positioned element and the left edge of its containing block.
A.1.46. letter-spacingThis defines the amount of whitespace to be inserted between the character boxes of text. Since character glyphs are typically narrower than their character boxes, length values create a modifier to the usual spacing between letters. Thus, normal is synonymous with 0. Negative length values are permitted and will cause letters to bunch closer together.
A.1.47. line-heightThis property influences the layout of line boxes. When applied to a block-level element, it defines the minimum distance between baselines within that element, but not the maximum. The difference between the computed values of line-height and font-size (called "leading" in CSS) is split in half and added to the top and bottom of each piece of content in a line of text. The shortest box that can enclose all of those pieces of content is the line box. A raw number value assigns a scaling factor, which is inherited instead of a computed value. Negative values are not permitted.
A.1.48. list-styleThis is a shorthand property that condenses all the other list-style properties. Because it applies to any element that has a display of list-item, it will apply only to li elements in ordinary HTML and XHTML, although it can be applied to any element and inherited by list-item elements.
A.1.49. list-style-imageThis specifies an image to be used as the marker on an ordered or unordered list item. The placement of the image with respect to the content of the list item can be broadly controlled using list-style-position.
A.1.50. list-style-positionThis property is used to declare the position of the list marker with respect to the content of the list item. Outside markers are placed some distance from the border edge of the list item, but the distance is not defined in CSS. Inside markers are treated as though they were an inline element inserted at the beginning of the list item's content.
A.1.51. list-style-typeThis is used to declare the type of marker system to be used in the presentation of a list.
A.1.52. marginThis shorthand property sets the width of the overall margin for an element or sets the widths of each individual side margin. Vertically adjacent margins of block-level elements are collapsed, whereas inline elements effectively do not take top and bottom margins. The left and right margins of inline elements do not collapse, nor do margins on floated elements. Negative margin values are permitted, but use them with caution.
A.1.53. margin-bottomThis sets the width of the bottom margin for an element. Negative values are permitted, but use them with caution.
A.1.54. margin-leftThis sets the width of the left margin for an element. Negative values are permitted, but use them with caution.
A.1.55. margin-rightThis sets the width of the right margin for an element. Negative values are permitted, but use them with caution.
A.1.56. margin-topThis sets the width of the top margin for an element. Negative values are permitted, but use them with caution.
A.1.57. max-heightThe value of this property sets a maximum constraint on the height of the element. Thus, the element can be shorter than the specified value, but not taller. Negative values are not permitted.
A.1.58. max-widthThe value of this property sets a maximum constraint on the width of the element. Thus, the element can be narrower than the specified value, but not wider. Negative values are not permitted.
A.1.59. min-heightThe value of this property sets a minimum constraint on the height of the element. Thus, the element can be taller than the specified value, but not shorter. Negative values are not permitted.
A.1.60. min-widthThe value of this property sets a minimum constraint on the width of the element. Thus, the element can be wider than the specified value, but not narrower. Negative values are not permitted.
A.1.61. outlineThis shorthand property is used to set the overall outline for an element. Outlines can be of irregular shape, and they do not change or otherwise affect the placement of elements.
A.1.62. outline-colorThis property sets the color for the visible portions of the overall outline of an element. Remember that an outline's style must be something other than none for any border to appear.
A.1.63. outline-styleThis property is used to set the style for the overall border of an element. The style must be something other than none for any outline to appear.
A.1.64. outline-widthThis property sets the width for the overall outline of an element. The width will take effect only for a given outline if the outline's style is something other than none. If the style is none, the width is effectively reset to 0. Negative length values are not permitted.
A.1.65. overflowThis defines what happens to content that overflows the content area of an element. For the value scroll, user agents are supposed to provide a scrolling mechanism whether or not it is actually needed; thus, for example, scrollbars would appear even if all content can fit within the element box.
A.1.66. paddingThis shorthand property sets the width of the overall padding for an element or sets the widths of each individual side padding. Padding set on inline nonreplaced elements does not affect line-height calculations; therefore, such an element with both padding and a background may visibly extend into other lines and potentially overlap other content. The background of the element will extend throughout the padding. Negative padding values are not permitted.
A.1.67. padding-bottomThis property sets the width of the bottom padding for an element. Bottom padding set on inline nonreplaced elements does not affect line-height calculations; therefore, such an element with both bottom padding and a background may visibly extend into other lines and potentially overlap other content. Negative padding values are not permitted.
A.1.68. padding-leftThis property sets the width of the left padding for an element. Left padding set for an inline nonreplaced element will appear only on the left edge of the first inline box generated by the element. Negative padding values are not permitted.
A.1.69. padding-rightThis property sets the width of the right padding for an element. Right padding set for an inline nonreplaced element will appear only on the right edge of the last inline box generated by the element. Negative padding values are not permitted.
A.1.70. padding-topThis property sets the width of the top padding for an element. Top padding set on inline nonreplaced elements does not affect line-height calculations; therefore, such an element with both top padding and a background may visibly extend into other lines and potentially overlap other content. Negative padding values are not permitted.
A.1.71. positionThis defines the positioning scheme used to lay out an element. Any element may be positioned, although elements positioned with absolute or fixed will generate a block-level box no matter what kind of element they are. An element that is relatively positioned is offset from its default placement in the normal flow.
A.1.72. quotesThis property is used to determine the quotation pattern used with quotes and nested quotes. The actual quote marks are inserted via the property content.
A.1.73. rightThis property defines the offset between the right outer margin edge of a positioned element and the right edge of its containing block.
A.1.74. text-alignThis property sets the horizontal alignment of text within a block-level element by defining the point with which line boxes are aligned. The value justify is supported by allowing user agents to programmatically adjust the letter and word spacing of the line's content; results may vary by user agent.
A.1.75. text-decorationThis property allows certain text effects such as underlining. These decorations will "span" descendant elements that do not have decorations of their own. User agents are not required to support blink.
A.1.76. text-indentUsed to define the indentation of the first line of content in a block-level element. This is most often used to create a "tab" effect. Negative values are permitted and cause "outdent" (or "hanging indent") effects.
A.1.77. text-transformThis property changes the case of letters in an element, regardless of the case of the text in the document source. The determination of which letters are to be capitalized by the value capitalize is not precisely defined, as it depends on user agents knowing how to recognize a "word."
A.1.78. topThis property defines the offset between the top outer margin edge of a positioned element and the top edge of its containing block.
A.1.79. unicode-bidiThis allows the author to generate levels of embedding within the Unicode embedding algorithm. User agents that do not support bidirectional text are permitted to ignore this property.
A.1.80. vertical-alignThis defines the vertical alignment of an inline element's baseline with respect to the baseline of the line in which it resides. Negative length and percentage values are permitted, and they lower the element instead of raising it. In table cells, this property sets the alignment of the content of the cell within the cell box.
A.1.81. visibilityThis specifies whether the element box generated by an element is rendered. This means the element could occupy the space it would ordinarily, but be completely invisible. The value collapse is used in tables to remove columns or rows from the table's layout.
A.1.82. white-spaceThis declares how whitespace within an element is handled during layout. The values pre-wrap and pre-line were added in CSS2.1.
A.1.83. widthThis defines the width of an element's content area, outside of which padding, borders, and margins are added. This property is ignored for inline nonreplaced elements. Negative length and percentage values are not permitted.
A.1.84. word-spacingThis defines the amount of whitespace to be inserted between words in an element. For the purposes of this property, a "word" is defined as a string of characters surrounded by whitespace. Length values create a modifier to the usual spacing between words; thus, normal is synonymous with 0. Negative length values are permitted and will cause words to bunch closer together.
A.1.85. z-indexThis property sets the placement of a positioned element along the z-axis, which is defined as the axis that extends perpendicular to the display area. Positive numbers are closer to the user, and negative numbers are further away.
|