320 likes | 433 Vues
ECA 225. Applied Online Programming. Cascading Style Sheets, pt 2. background-color. background-color: <color value>. body { background-color: red; }. background-image. background-image: <url> | none. body { background-image:url( imageName.gif); }. background-repeat.
E N D
ECA 225 AppliedOnline Programming Cascading Style Sheets, pt 2
background-color • background-color: <color value> body { background-color: red; } ECA225 Applied Interactive Programming
background-image • background-image: <url> | none body { background-image:url( imageName.gif); } ECA225 Applied Interactive Programming
background-repeat • background-repeat: repeat | repeat-x | repeat-y | no-repeat body { background-repeat: repeat-x; } ECA225 Applied Interactive Programming
background-attachment • background-attachment: scroll | fixed body { background-attachment: scroll; } ECA225 Applied Interactive Programming
border-color • border-color: <color value> p.box { border-color: #ff0000; } ECA225 Applied Interactive Programming
border-style • border-style: none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset p.box { border-style: groove; } ECA225 Applied Interactive Programming
border-width • border-width: thin | medium | thick | <length> p.box { border-width: thin; } ECA225 Applied Interactive Programming
color • color: <color value> h3 { color: red; } ECA225 Applied Interactive Programming
display • display: none | block | inline | list-item a { display: block; } ECA225 Applied Interactive Programming
float • float: left | right | none img.floatExample { float: right; } ECA225 Applied Interactive Programming
font-family • font-family: <specific family> | <generic family> h2 { font-family: Helvetica, Arial, sans-serif; } ECA225 Applied Interactive Programming
font-style • font-style: normal | italic | oblique p.italic { font-style: italic; } ECA225 Applied Interactive Programming
font-size • font-size: <length> | <percentage> | <absolute-size> | <relative-size> p.sizeExample { font-size: 2em; } ECA225 Applied Interactive Programming
font-variant • font-variant: small-caps | none .sml { font-variant: small-caps; } ECA225 Applied Interactive Programming
font-weight • font-weight: normal | bold | bolder | lighter | numeric values 1 - 9 p.bold { font-weight: bold; } ECA225 Applied Interactive Programming
letter-spacing • letter-spacing: <length> p { letter-spacing: 0.4em; } ECA225 Applied Interactive Programming
line-height • line-height: <multiplier> | <percentage> | <absolute value> p { line-height: 1.5em; } ECA225 Applied Interactive Programming
list-style-type • list-style-type: disc | circle | square | decimal | decimal-leading-zero | lower-roman | upper-roman | lower-alpha | upper-alpha | none ul { list-style-type: square; } ol ol { list-style-type: lower-roman; } ECA225 Applied Interactive Programming
list-style-image • list-style-image: <url> | none ol { list-style-type: url( imageName.gif ); } ECA225 Applied Interactive Programming
list-style-position • list-style-position: inside | outside ol { list-style-position: inside; } ECA225 Applied Interactive Programming
margin • margin: <length> | <percentage> ( margin-left, margin-top, margin-right, margin-bottom) h1 { margin-top: .5em; } ECA225 Applied Interactive Programming
padding • padding: <length> | <percentage> ( padding-left, padding-top, padding-right, padding-bottom) h1 { padding-top: 2em; } ECA225 Applied Interactive Programming
position • position: relative | absolute | left | top | right | bottom .imagePosition { position: absolute; left: 0px; top: 0px; } ECA225 Applied Interactive Programming
text-align • text-align: left | right | center | justify td { text-align: right; } ECA225 Applied Interactive Programming
text-indent • text-indent: <length> | <percentage> p { text-indent: 3em; } ECA225 Applied Interactive Programming
text-decoration • text-decoration: none | underline | overline | line-through | blink a:hover { text-decoration: underline; } ECA225 Applied Interactive Programming
text-transform • text-transform: capitalize | uppercase | lowercase | none ul { text-transform: capitalize; } ECA225 Applied Interactive Programming
vertical-align • vertical-align: baseline | sub | super | top | middle | bottom | text-top | text-bottom td { vertical-align: top; } ECA225 Applied Interactive Programming
white-space • white-space: <pre> | <nowrap> | <normal> #toc { white-space: nowrap; } ECA225 Applied Interactive Programming
word-spacing • word-spacing: <length> p { word-spacing: 0.4em; } ECA225 Applied Interactive Programming
z-index • z-index: <integer>higher numbers are higher in the stack .topImage { z-index: 4; } ECA225 Applied Interactive Programming