Cascading Style Sheets Reference - Stanford University

[Pages:26]Cascading Style Sheets Reference



Background

Property background background-attachment background-color background-image background-position

background-repeat

Description A shorthand property for setting all background properties in one declaration

Sets whether a background image is fixed or scrolls with the rest of the page Sets the background color of an element

Sets an image as the background Sets the starting position of a background image

Sets if/how a background image will be repeated

Values

background-color background-image background-repeat background-attachment background-position

scroll fixed

color-rgb color-hex color-name transparent

url none

top left top center top right center left center center center right bottom left bottom center bottom right x-% y-% x-pos y-pos

repeat repeat-x repeat-y no-repeat

IE F N W3C 4 161 4 161 4 141 4 141 4 161

4 141

CSS Reference

November 2006

Page 1 of 26

Border

Property border

border-bottom

border-bottom-color border-bottom-style border-bottom-width

border-color border-left

border-left-color border-left-style border-left-width

border-right

border-right-color border-right-style border-right-width

Description

Values

A shorthand property for

border-width

setting all of the properties for border-style

the four borders in one

border-color

declaration

A shorthand property for

border-bottom-width

setting all of the properties for border-style

the bottom border in one

border-color

declaration

Sets the color of the bottom border

border-color

Sets the style of the bottom border

border-style

Sets the width of the bottom border

thin medium thick length

Sets the color of the four

color

borders, can have from one to

four colors

A shorthand property for

border-left-width

setting all of the properties for border-style

the left border in one

border-color

declaration

Sets the color of the left border border-color

Sets the style of the left border border-style

Sets the width of the left border

thin medium thick length

A shorthand property for

border-right-width

setting all of the properties for border-style

the right border in one

border-color

declaration

Sets the color of the right border

border-color

Sets the style of the right border

border-style

Sets the width of the right border

thin medium thick length

IE F N W3C 4 141

4 161

4 162 4 162 4 141

4 161 4 161

4 162 4 162 4 141

4 161

4 162 4 162 4 141

CSS Reference

November 2006

Page 2 of 26

Border CONTINUED

border-style Sets the style of the four borders, can have from one to four styles

border-top A shorthand property for setting all of the properties for the top border in one declaration

border-top- Sets the color of the top border color

border-top- Sets the style of the top border style

border-top- Sets the width of the top border width

borderwidth

A shorthand property for setting the width of the four borders in one declaration, can have from one to four values

none hidden dotted dashed solid double groove ridge inset outset

4 1 6 1

border-topwidth border-style border-color

4 1 6 1

border-color 4 1 6 2

border-style 4 1 6 2

thin medium thick length

thin medium thick length

4 1 4 1 4 1 4 1

CSS Reference

November 2006

Page 3 of 26

Classification

Property clear cursor

display

float position visibility CSS Reference

Description

Values

Sets the sides of an element where other floating elements are not allowed

left right both none

Specifies the type of cursor to be displayed

url auto crosshair default pointer move e-resize ne-resize nw-resize n-resize se-resize sw-resize s-resize w-resize text wait help

Sets how/if an element is displayed

none inline block list-item run-in compact marker table inline-table table-row-group table-header-group table-footer-group table-row table-column-group table-column table-cell table-caption

Sets where an image or a text left will appear in another element right

none

Places an element in a static, relative, absolute or fixed position

static relative absolute fixed

Sets if an element should be visible or invisible

visible hidden collapse

November 2006

IE F N W3C 4 141 4 162

4 141

4 141 4 142 4 162

Page 4 of 26

Dimension

Property height line-height

max-height max-width min-height min-width width

Description

Values

Sets the height of an element

auto length %

Sets the distance between lines normal number length %

Sets the maximum height of an element

none length %

Sets the maximum width of an none

element

length

%

Sets the minimum height of an length

element

%

Sets the minimum width of an length

element

%

Sets the width of an element

auto % length

IE F N W3C 4 161 4 141

- 162 - 162 - 162 - 162 4 141

CSS Reference

November 2006

Page 5 of 26

Font

Property font

font-family font-size

font-size-adjust font-stretch

font-style font-variant font-weight CSS Reference

Description

Values

IE

A shorthand property for

font-style

4

setting all of the properties for font-variant

a font in one declaration

font-weight font-size/line-height

font-family

caption

icon

menu

message-box

small-caption

status-bar

A prioritized list of font family family-name

3

names and/or generic family generic-family

names for an element

Sets the size of a font

xx-small

3

x-small

small

medium

large

x-large

xx-large

smaller

larger

length

%

Specifies an aspect value for none

-

an element that will preserve number

the x-height of the first-choice

font

Condenses or expands the normal

-

current font-family

wider

narrower

ultra-condensed

extra-condensed

condensed

semi-condensed

semi-expanded

expanded

extra-expanded

ultra-expanded

Sets the style of the font

normal

4

italic

oblique

Displays text in a small-caps normal

4

font or a normal font

small-caps

Sets the weight of a font

normal bold bolder

lighter 4 100 - 900

November 2006

F N W3C 1 4 1

1 4 1 1 4 1

- - 2 - - 2

1 4 1 1 6 1 1 4 1

Page 6 of 26

Generated Content

Property content

counter-increment counter-reset quotes

Description

Values

Generates content in a document. Used with the :before and :after pseudoelements

string url counter(name) counter(name, list-styletype) counters(name, string) counters(name, string, list-style-type) attr(X) open-quote close-quote no-open-quote no-close-quote

Sets how much the counter none increments on each occurrence identifier number of a selector

Sets the value the counter is none set to on each occurrence of a identifier number selector

Sets the type of quotation marks

none string string

IE F N W3C 1 6 2

2 2 - 162

CSS Reference

November 2006

Page 7 of 26

List and Marker

Property list-style list-style-image list-style-position list-style-type

marker-offset

Description

Values

A shorthand property for

list-style-type

setting all of the properties for list-style-position

a list in one declaration

list-style-image

Sets an image as the list-item none

marker

url

Sets where the list-item marker is placed in the list

inside outside

Sets the type of the list-item marker

none disc circle square decimal decimal-leading-zero lower-roman upper-roman lower-alpha upper-alpha lower-greek lower-latin upper-latin hebrew armenian georgian cjk-ideographic hiragana katakana hiragana-iroha katakana-iroha

auto length

IE F N W3C 4 161 4 161 4 161 4 141

1 7 2

CSS Reference

November 2006

Page 8 of 26

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download