Appendix C. Cascading Style Sheet Properties Quick Reference


In the following table, we list, in alphabetical order, all the properties defined in the World Wide Web Consortium's (W3C's) Recommended Specification for Cascading Style Sheets (CSS), Level 2 (http://www.w3.org/pub/WWW/TR/REC-CSS2). We include each property's possible values, defined as either an explicit keyword (shown in constant width ) or as one of these values:



angle

A numeric value followed by deg , grad , or rad .



color

Either a color name or hexadecimal RGB value, as defined in Appendix G, or an RGB triple of the form:

 rgb(   red   ,   green   ,   blue   ) 

where red , green , and blue are either numbers in the range 0 to 255 or percentage values indicating the brightness of that color component. Values of 255 or 100% indicate that the corresponding color component is at its brightest; values of or 0% indicate that the corresponding color component is turned off completely. For example:

 rgb(27, 119, 207) rgb(50%, 75%, 0%) 

are both valid color specifications.



frequency

A numeric value followed by hz or khz , indicating hertz or kilohertz.



length

An optional sign (either + or -), immediately followed by a number (with or without a decimal point), immediately followed by a two-character unit identifier. For values of , the unit identifier may be omitted.

The unit identifiers em and ex refer to the overall height of the font and to the height of the letter "x," respectively. The unit identifier px is equal to a single pixel on the display device. The unit identifiers in , cm , mm , pt , and pc refer to inches, centimeters, millimeters, points, and picas, respectively. There are 72.27 points in an inch and 12 points in a pica.



number

An optional sign, immediately followed by a number (with or without a decimal point).



percent

An optional sign, immediately followed by a number (with or without a decimal point), immediately followed by a percent sign. The actual value is computed as a percentage of some other element property, usually the element's size .



shape

A shape keyword, followed by a parentheses- enclosed list of comma-separated, shape-specific parameters. Currently, the only supported shape keyword is rect , which expects four numeric parameters denoting the offsets of the top, right, bottom, and left edges of the rectangle.



time

A numeric value followed by s or ms , designating a time in seconds or in milliseconds .



url

The keyword url , immediately followed (no spaces) by a left parenthesis, followed by a URL optionally enclosed in single or double quotes, followed by a matching right parenthesis. For example:

 url("http://www.oreilly.com/catalog") 

is a valid URL value.

Finally, some values are lists of other values and are described as a "list of" some other value. In these cases, a list consists of one or more of the allowed values, separated by commas.

If several different values are allowed for a property, these alternative choices are separated by pipes ( ).

If the standard defines a default value for the property, that value is underlined .

azimuth

angle left-side far-left left center-left center center-right right far-right right-side

Determines the position around the listener at which a sound is played .

8.4.12.7

background

 

Composite property for the background-attachment , background-color , background-image , background-position , and background-repeat properties; value is any of these properties' values, in any order.

8.4.5.6

background-attachment

scroll fixed

Determines whether the background image is fixed in the window or scrolls as the document scrolls .

8.4.5.3

background-color

color transparent

Sets the background color of an element.

8.4.5.1

background-image

url none

Sets the background image of an element.

8.4.5.2

background-position

percent length top center bottom left right

Sets the initial position of the element's background image, if specified; values normally are paired to provide X,Y positions ; default position is 0% 0% .

8.4.5.4

background-repeat

repeat repeat-x repeat-y no-repeat

Determines how the background image is repeated (tiled) across an element.

8.4.5.5

border

 

Sets all four of an element's borders; value is one or more of a color , a value for border-width , and a value for border-style .

8.4.7.6

border-bottom

 

Sets an element's bottom border; value is one or more of a color , a value for border-bottom-width , and a value for border-style .

8.4.7.6

border-bottom-width

length thin medium thick

Sets the thickness of an element's bottom border.

8.4.7.4

border-collapse

collapse separate

Sets the table border rendering algorithm.

8.4.9.1

border-color

color

Sets the color of all four of an element's borders; default is the color of the element.

8.4.7.3

border-left

 

Sets an element's left border; value is one or more of a color , a value for border-left-width , and a value for border-style .

8.4.7.6

border-left-width

length thin medium thick

Sets the thickness of an element's left border

8.4.7.4

border-right

 

Sets an element's right border; value is one or more of a color , a value for border-right-width , and a value for border-style .

8.4.7.6

border-right-width

length thin medium thick

Sets the thickness of an element's right border.

8.4.7.4

border-spacing

 

With separate borders, sets the spacing between bordersone value sets vertical and horizontal spacing; two values set horizontal and vertical spacing, respectively.

8.4.9.1

border-style

dashed dotted double groove inset none outset ridge solid

Sets the style of all four of an element's borders.

8.4.7.5

border-top

 

Sets an element's top border; value is one or more of a color , a value for border-top-width , and a value for border-style .

8.4.7.6

border-top-width

length thin medium thick

Sets the thickness of an element's top border.

8.4.7.4

border-width

length thin medium thick

Sets the thickness of all four of an element's borders.

8.4.7.4

bottom

length percent

Used with the position property to place the bottom edge of an element.

8.4.7.14

caption-side

top bottom left right

Sets the position for a table caption.

8.4.9.2

clear

both left none right

Sets which margins of an element must not be adjacent to a floating element; the element is moved down until that margin is clear.

8.4.7.7

clip

shape

Sets the clipping mask for an element.

8.4.7.8

color

color

Sets the color of an element.

8.4.5.7

content

 

Inserts generated content around an element; see text for details.

8.4.11.2

counter-increment

 

Increments a counter by 1; value is a list of counter names , with each name optionally followed by a value by which it is incremented.

8.4.11.4

counter-reset

 

Resets a counter to zero; value is a list of counter names, with each name optionally followed by a value to which it is reset.

8.4.11.4

cue-after

url none

Plays the designated sound after an element is spoken.

8.4.12.5

cue-before

url none

Plays the designated sound before an element is spoken.

8.4.12.5

display

block inline list-item marker none

Controls how an element is displayed.

8.4.10.1

elevation

angle below level above higher lower

Sets the height at which a sound is played.

8.4.12.7

empty- cells

hide show

With separate borders, hides empty cells in a table.

8.4.9.1

float

left none right

Determines whether an element floats to the left or right, allowing text to wrap around it or be displayed inline (using none ).

8.4.7.9

font

 

Sets all font attributes for an element; value is any of the values for font-style , font-variant , font-weight , font-size , line-height , and font-family , in that order.

8.4.3.8

font-family

List of font names

Defines the font for an element, either as a specific font or as one of the generic fonts serif , sans-serif , cursive , fantasy , and monospace .

8.4.3.1

font-size

xx-small x-small small medium large x-large xx-large larger smaller length percent

Defines the font size.

8.4.3.2

font-size-adjust

none ratio

Adjusts the current font's aspect ratio.

8.4.3.4

font-stretch

wider normal narrower ultra-condensed extra-condensed condensed semi-condensed semi-expanded expanded extra-expanded ultra -expanded

Determines the amount to stretch the current font.

8.4.3.3

font-style

normal italic oblique

Defines the style of the face, either normal or some type of slanted style.

8.4.3.5

font-variant

normal small-caps

Defines a font to be in small caps.

8.4.3.6

font-weight

normal bold bolder lighter number

Defines the font weightif a number is used, it must be a multiple of 100 between 100 and 900; 400 is normal, 700 is the same as the keyword bold .

8.4.3.7

height

length auto

Defines the height of an element.

8.4.7.10

left

length percent

Used with the position property to place the left edge of an element.

8.4.7.14

letter-spacing

length normal

Inserts additional space between text characters .

8.4.6.1

line-height

length number percent normal

Sets the distance between adjacent text baselines.

8.4.6.2

list-style

 

Defines list- related styles using any of the values for list-style-image , list-style-position , and list-style-type .

8.4.8.4

list-style-image

url none

Defines an image to be used as a list item's marker, in lieu of the value for list-style-type .

8.4.8.1

list-style-position

inside outside

Indents or extends (default) a list item's marker with respect to the item's content.

8.4.8.2

list-style-type

circle disc square decimal lower-alpha lower-roman none upper-alpha upper-roman

Defines a list item's marker either for unordered lists ( circle, disc , or square ) or for ordered lists ( decimal , lower-alpha , lower-roman , none , upper-alpha , or upper-roman ).

8.4.8.3

margin

length percent auto

Defines all four of an element's margins.

8.4.7.11

margin-bottom

length percent auto

Defines the bottom margin of an element; default value is .

8.4.7.11

margin-left

length percent auto

Defines the left margin of an element; default value is .

8.4.7.11

margin-right

length percent auto

Defines the right margin of an element; default value is .

8.4.7.11

margin-top

length percent auto

Defines the top margin of an element; default value is .

8.4.7.11

orphans

number

Sets the minimum number of lines allowed in an orphaned paragraph fragment.

8.4.13.5

overflow

auto hidden scroll visible

Determines how overflow content is rendered.

8.4.7.13

padding

 

Defines all four padding amounts around an element.

8.4.7.12

padding-bottom

length percent

Defines the bottom padding of an element; default value is .

8.4.7.12

padding-left

length percent

Defines the left padding of an element; default value is .

8.4.7.12

padding-right

length percent

Defines the right padding of an element; default value is .

8.4.7.12

padding-top

length percent

Defines the top padding of an element; default value is .

8.4.7.12

page

name

Associates a named page layout with an element.

8.4.13.3

page-break-after

auto always avoid left right

Forces or suppresses page breaks after an element.

8.4.13.4

page-break-before

auto always avoid left right

Forces or suppresses page breaks before an element.

8.4.13.4

page-break-inside

auto avoid

Suppresses page breaks within an element.

8.4.13.4

pause-after

percent time

Pauses after speaking an element.

8.4.12.4

pause-before

percent time

Pauses before speaking an element.

8.4.12.4

pitch

frequency x-low low medium high x-high

Sets the average pitch of an element's spoken content.

8.4.12.3

pitch-range

number

Sets the range of the pitch, from 0 (flat) to 100 (broad); default is 50 .

8.4.12.3

play-during

url mix none repeat

If a URL is provided, it is played during an element's spoken contentspecifying repeat loops the audio; mix causes it to mix with, rather than replace, other background audio.

8.4.12.6

position

absolute fixed relative static

Sets the positioning model for an element.

8.4.7.14

quotes

List of strings

Sets the quote symbols used to quote text.

8.4.11.3

richness

number

Sets the richness of the voice, from 0 (flat) to 100 (mellifluous); default is 50 .

8.4.12.3

right

length percent

Used with the position property to place the right edge of an element.

8.4.7.14

speak

normal none spell-out

Determines how an element's content is spoken.

8.4.12.2

speak-header

always once

Determines whether table headers are spoken once for each row or column or each time a cell is spoken.

8.4.9.3

speak-numeral

continuous digits

Determines how numerals are spoken.

8.4.12.2

speak-punctuation

code none

Determines whether punctuation is spoken or used for inflection .

8.4.12.2

speech-rate

number x-slow slow medium fast x-fast faster slower

Sets the rate of speech; a number sets the rate in words per minute.

8.4.12.3

stress

number

Sets the stress of the voice, from 0 (catatonic) to 100 (hyperactive); default is 50 .

8.4.12.3

table-layout

auto fixed

Determines the table-rendering algorithm.

8.4.9.4

text-align

center justify left right

Sets the text alignment style for an element.

8.4.6.3

text-decoration

blink line-through none overline underline

Defines any decoration for the text; values may be combined.

8.4.6.4

text-indent

length percent

Defines the indentation of the first line of text in an element; default is .

8.4.6.5

text-shadow

See text

Creates text drop shadows of varying colors and offsets.

8.4.6.6

text-TRansform

capitalize lowercase none uppercase

transforms the text in the element accordingly .

8.4.6.7

top

length percent

Used with the position property to place the top edge of an element.

8.4.7.14

vertical-align

percent baseline bottom middle sub super text-bottom text-top top

Sets the vertical positioning of an element.

8.4.6.8

visibility

collapse hidden visible

Determines whether an element is visible in the document or table.

8.4.7.15

voice-family

List of voices

Selects a named voice family to speak an element's content.

8.4.12.3

volume

number percent silent x-soft soft medium loud x-loud

Sets the volume of spoken content; numeric values range from 0 to 100.

8.4.12.1

white-space

normal nowrap pre

Defines how whitespace within an element is handled.

8.4.10.2

widows

number

Sets the minimum number of lines allowed in a widowed paragraph fragment.

8.4.13.5

width

length percent auto

Defines the width of an element.

8.4.7.16

word-spacing

length normal

Inserts additional space between words.

8.4.6.9

z-index

number

Sets the rendering layer for the current element.

8.4.7.17




HTML & XHTML(c) The definitive guide
Data Networks: Routing, Security, and Performance Optimization
ISBN: 596527322
EAN: 2147483647
Year: 2004
Pages: 189
Authors: Tony Kenyon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net