Senin, 30 April 2012

CSS part 1

- Font Properties

Property

Valid Values

Example

Inherited?

font-family

[font name or type]

font-family: Verdana, Arial;

Y

font-style

normal | italic

font-style:italic;

Y

font-variant

normal | small-caps

font-variant:small-caps;

Y

font-weight

normal | bold

font-weight:bold;

Y

font-size

[ xx-large | x-large | large | medium | small | x-small | xx-small ] |

[ larger | smaller ] | percentage | length

font-size:12pt;

Y

font

[ font-style || font-variant || font-weight ] ? font-size [ / line-height ] ? font-family

font: bold 12pt Arial;

Y

- Color and Background Properties

Property

Valid Values

Example

Inherited?

color

color

color: red

Y

background-color

color | transparent

background-color: yellow

N*

background-image

url | none

background-image: url(house.jpg)

N*

background-repeat

repeat | repeat-x | repeat-y | no-repeat

background-repeat: no-repeat

N*

background-attachment

scroll | fixed

background-attachment: fixed

N*

background-position

[ position | length ] | {1,2} | [ top | center | bottom ] || [ left | center | right ]

background-position: top center

N*

background

transparent | color || url || repeat || scroll || position

background: silver url(house.jpg) repeat-y

N*

* Starting in CSS2, the properties indicated above are inherited.

- Text Properties

Property

Valid Values

Example

Inherited?

letter-spacing

normal | length

letter-spacing:5pt

Y

text-decoration

none | underline | overline | line-through

text-decoration:underline

N

vertical-align

sub | super |

vertical-align:sub

N

text-transform

capitalize | uppercase | lowercase | none

text-transform:lowercase

N

text-align

left | right | center | justify

text-align:center

N

text-indent

length | percentage

text-indent:25px

N

line-height

normal | number | length | percentage

line-height:15pt

N

- Box Properties

Property

Valid Values

Example

Inherited?

margin-top

length | percentage | auto

margin-top:5px

N

margin-right

length | percentage | auto

margin-right:5px

N

margin-bottom

length | percentage | auto

margin-bottom:1em

N

margin-left

length | percentage | auto

margin-left:5pt

N

margin

length | percentage | auto {1,4}

margin: 10px 5px 10px 5px

N

padding-top

length | percentage

padding-top:10%

N

padding-right

length | percentage

padding-right:15px

N

padding-bottom

length | percentage

padding-bottom:1.2em

N

padding-left

length | percentage

padding-left:10pt; }

N

padding

length | percentage {1,4}

padding: 10px 10px 10px 15px

N

0 comments:

Posting Komentar