![]() Capt. Horatio T.P. Webb |
DISC 3371 Transaction Processing I Last Updated 2PM 11/11/2007 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| This document uses: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> See quirksmode for alternative interpretations of the various browser differences and solution options for CSS. CSS Structure The general notion of a style sheet is to define for a particular element or type of element specific styles that control such presentation properties as: color; font; background; and position. In its most simple form, the style information (rules) is contained inside the HTML document HEAD tags. In general the CSS rules consist of a selector (an HTML element) and a declaration (assigning a property of the selector a value). In the simple case, each element type is first named, then followed by a {, then a property is named followed by a : and then an appropriate property value and finally ending with a }. Multiple properties for a selector are separated by a ;. In general, four ways to identify the style sheet are available:
font |
font assigns up to six possible values for the font property in a single css declaration. |
font-style |
values are: normal | italic | oblique
|
font-family |
values are: family-name | generic-name , family-name | generic-name , ...
|
multiple font-family values may be specified.
font-size |
values are: xx-small | x-small | small | medium | large | x-large | xx-large | length |
font-weight |
values are:
normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
|
font-variant |
values are: normal | small-caps
|
word-spacing |
values are:
normal | some-length (px, em ex)
| letter-spacing |
values are:
normal | some-length (px, em ex)
| text-decoration |
values: none | underline | overline | line-through | blink
| vertical-align |
values are: baseline | sub | super | top | text-top | middle | bottom | text-bottom | percentage
| text-transform |
values are: none | capitalize | uppercase | lowercase
| text-align |
values are: left | right | center | justify
| some text
line-height |
values are: normal | number | length | percentage
| some
text text-indent |
values are: length | percentage
| some
text COLOR and BACKGROUND Properties |
color |
color formats are:
|
background-color |
values are: color | transparent
| background-image |
values are: url(url inside these paraenteses)
| some text background-repeat |
values are: repeat | repeat-x | repeat-y | no-repeat
| some text background-attachment |
values are: scroll | fixed
| some text background-position |
values are: top left |top center | top right | center left | center center | center right | bottom left | bottom center | bottom right | x% y% | xpos ypos
| the first value refers to vertical centering and the second value to horizontal
some text display |
values are: none | block | inline | list-item | run-in | compact | table | inline-table | table-row-group | | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell| table-caption white-space |
values are: normal | pre | nowrap
| list-style | list-style is a composite property that allows one to specify any or all of the three list-style details below (i.e., list-style-type, list-style-image, or list-style-position. e.g.,
| list-style-type |
value are: disc | circle | square | decimal | lower-roman | upper-roman | lower-alpha | upper-alpha | | box | none
list-style-image |
values are: none | url( )
| list-style-position |
values are: outside | inside (default is outside)
| defines where extra text is to be aligned when text following the marker wraps to a new line. If you use outside new line text does not align with the marker, using inside it aligns with the marker. <ol> <span style="list-style-position: inside;"><li> some text like now is the time for all good men to come to the aid of their party while the quick brown fox jumps over the lazy dogs back</span> <span style="list-style-position: outside;"><li> some text like now is the time for all good men to come to the aid of their party while the quick brown fox jumps over the lazy dogs back</span> </ol> appears as:
The box model is not a tag like <table> -- it is various tags that make up the dimensions of any element. The properties below may apply to almost any HTML tag. The block level elements are: applet; blockquote; body; button; div; dl; fieldset; form; frameset; h; head; html; iframe; img; layer; legend; object; ol; p; select; table; and ul. These properties also apply to in-line elements that don't change the flow of the HTML are:
a; abbr; acronym; b; basefont; big; br; cite; code; dfn; em; font; i; img; input;kbd; label; q; s;
samp; select; small; span; strike; strong; sub; sup; textarea; tt; u; var. The following diagram indicated the four areas controlled by the box model. In theory:
|
margin |
margin is a composite property that allows one to specify any or all of the four margin details below.
|
margin-top |
values are: auto | height | percentage
| height can be expressed in em, ex, px or cm, mm, in, pt, pc some text margin-right |
values are: auto | height | percentage
| height can be expressed in em, ex, px or cm, mm, in, pt, pc <p style="align:right;margin-right: 36px;"> some</p> <p style="align:right;"> text</p> some text margin-bottom |
values are: auto | height | percentage
| height can be expressed in em, ex, px or cm, mm, in, pt, pc some text margin-left |
values are: auto | height | percentage
| height can be expressed in em, ex, px or cm, mm, in, pt, pc <p style="margin-left: 36px;"> some</p> <p > text</p> some text padding |
padding is a composite property that allows one to specify any or all of the four padding details below
|
<table border='1'><tr><td><p style="padding: 0px 6px 12px 18px;">some text</p></td></tr></table>
padding-top |
values are: length | percentage
| length can be expressed in em, ex, px or cm, mm, in, pt, pc percentage is of the nearest parent's width <table border='1'><tr><td><p style="padding-top: 36px;">some text</p></td></tr></table>
padding-right |
values are: length | percentage
| length can be expressed in em, ex, px or cm, mm, in, pt, pc percentage is of the nearest parent's width <table border='1'><tr><td><p style="padding-right: 36px;">some text</p></td></tr></table>
padding-bottom |
values are: length | percentage
| length can be expressed in em, ex, px or cm, mm, in, pt, pc percentage is of the nearest parent's width <table border='1'><tr><td><p style="padding-bottom: 36px;">some text</p></td></tr></table>
padding-left |
values are: length | percentage
| length can be expressed in em, ex, px or cm, mm, in, pt, pc percentage is of the nearest parent's width <table border='1'><tr><td><p style="padding-left: 36px;">some text</p></td></tr></table>
border |
border is a composite property that allows one to specify any or all of the three border properties: border-width (thin, medium, thick, or length), border-style (none, hidden, dotted, dashed, solid, double, groove, ridge, inset, or outset), and border-color (any color value)
| <table style='border:3px dashed #aa0000;'><tr><td>some text</td></tr></table>
border-width |
values are: thin | medium | thick | length | note: this is a composite property for all four border-widths (i.e., border-top-width, border-right-width, border-bottom-width, border-left-width).
<table style='border-style:solid;border-width:2px 4px 6px 8px;'><tr><td>some text</td></tr></table>
border-top-width |
values are: thin | medium | thick | length | note: border-style must be specified for this property to render <table style='border-style:solid;border-top-width:6px;'><tr><td>some text</td></tr></table>
border-right-width |
values are: thin | medium | thick | length | note: border-style must be specified for this property to render <table style='border-style:solid;border-right-width:6px;'><tr><td>some text</td></tr></table>
values are: thin | medium | thick | length | note: border-style must be specified for this property to render <table style='border-style:solid;border-bottom-width:6px;'><tr><td>some text</td></tr></table>
border-left-width |
values are: thin | medium | thick | length | note: border-style must be specified for this property to render <table style='border-style:solid;border-left-width:6px;'><tr><td>some text</td></tr></table>
border-color |
values are: transparent | color | note: this is a composite property for all four border colors (i.e., border-top-color, border-right-color, border-bottom-color, border-left-color).
<table style='border-style:solid;border-color: #cc0000 #0000aa #0000aa #cc0000;'><tr><td>some text</td></tr></table>
border-top-color |
values are: color | note: border-style must be specified for this property to render <table style='border-style:solid;border-top-color:aa0000;'><tr><td>some text</td></tr></table>
border-right-color |
values are: color | note: a border-style must be specified for this property to render <table style='border-style:solid;border-right-color:aa0000;'><tr><td>some text</td></tr></table>
border-bottom-color |
values are: color | note: a border-style must be specified for this property to render <table style='border-style:solid;border-bottom-color:aa0000;'><tr><td>some text</td></tr></table>
border-left-color |
values are: color | note: a border-style must be specified for this property to render <table style='border-style:solid;border-left-color:aa0000;'><tr><td>some text</td></tr></table>
border-style |
values are: none | dotted | dashed | solid | double | groove | ridge | inset | outset | note: this is a composite property for all four border styles (i.e., border-top-style, border-right-style, border-bottom-style, border-left-style).
<table style='border-style:solid dashed none ridge;'><tr><td>some text</td></tr></table>
border-top-style |
values are:values are: none | dotted | dashed | solid | double | groove | ridge | inset | outset | <table style='border-top-style:double;'><tr><td>some text</td></tr></table>
border-right-style |
values are:values are: none | dotted | dashed | solid | double | groove | ridge | inset | outset | <table style='border-right-style:dashed;'><tr><td>some text</td></tr></table>
border-bottom-style |
values are:values are: none | dotted | dashed | solid | double | groove | ridge | inset | outset | <table style='border-bottom-style:ridge;'><tr><td>some text</td></tr></table>
border-left-style |
values are:values are: none | dotted | dashed | solid | double | groove | ridge | inset | outset | <table style='border-left-style:groove;'><tr><td>some text</td></tr></table>
border-top |
note: this is a composite property for all three border-top properties (i.e., border-top-width, border-top-style, and border-top-color).
| <table style='border-top: 3px solid green;'><tr><td>some text</td></tr></table>
border-right |
note: this is a composite property for all three border-right properties (i.e., border-right-width, border-right-style, and border-right-color).
| <table style='border-right: 3px dashed red;'><tr><td>some text</td></tr></table>
border-bottom |
note: this is a composite property for all three border-bottom properties (i.e., border-bottom-width, border-bottom-style, and border-bottom-color).
| <table style='border-bottom: 3px double blue;'><tr><td>some text</td></tr></table>
border-left |
note: this is a composite property for all three border-left properties (i.e., border-left-width, border-left-style, and border-left-color).
| <table style='border-left: 3px dotted magenta;'><tr><td>some text</td></tr></table>
float |
values are: left | right | none
| specifies the alignment of text or images relative to a parent <table border="1" width="185"><tr><td> <img style="float:right;" src="captsm.gif"></td></tr></table>
clear |
values are: none | left | right | both
| prevents floating elements to appear to the left, right or both sides. <table border="1" width="185"><tr><td> <span style="float:left;">some left</span> <center><img src="cssredball.gif" style="clear:both"><center> <span style="float:right;">some right</span> </td></tr></table>
cursor |
values are: 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 | progress | hand | no-drop | not-allowed | row-resize | col-resize | vertical-text
url is the location of a custon cursor format of links below is <a href="#" style="cursor:cursor_type;">cursor_type</a>
crosshair,
auto,
default,
pointer,
move,
text,
help,
wait, position |
values are: static | relative | absolute | fixed
| specifies the type of positioning for an element
<img src="cssredball.gif" style="position:relative;left:120px;"> <img src="cssredball.gif" style="position:relative;left:180px;"> <img src="cssredball.gif" style="position:relative;left:240px;">
top |
values are: auto | percent | length
|
distance to from the top of the page (if position is absolute) or from the top of the container (if position is relative)
<div style="height:50px; width:50px;border:thin solid #000000;"><img src="cssredball.gif" style="position:relative;top:25px;"></div>
![]() left |
values are: auto | cent | length
|
distance to from the left page margin (if position is absolute) or from the left margin of the container (if position is relative)
<div style="height:50px; width:50px;border:thin solid #000000;"><img src="cssredball.gif" style="position:relative;left:25px;"></div>
![]() bottom |
values are: auto | percent | length
|
if position is relative, the distance from the bottom of the element is above its container, Note that the red ball is OUTSIDE the container
<div style="height:50px; width:50px;border:thin solid #000000;"><img src="cssredball.gif" style="position:relative;bottom:25px;"></div>
![]() right |
values are: auto | percent | length
| if position is absolute, the distance from the right of the element to the right of its container
Note that the red ball is OUTSIDE the container
<div style="height:50px; width:50px;border:thin solid #000000;"><img src="cssredball.gif" style="position:relative;right:25px;"></div>
![]() visibilty |
visible | hidden | collapse
| collapse is equivalent to hidden unless used on table elements where it causes the row or column to be removed but space taken up by the row or column is available for other rows or columns <img src="cssredball.gif" style="position:relative;left:120px;"> <img src="cssredball.gif" style="visibility:hidden;"> <img src="cssredball.gif" style="position:relative;left:240px;">
height |
values are: auto | length | percentage
| allows one to specify a height for the elements <img src="captsm.gif" style="position:relative;left:100px;"> <img src="captsm.gif" style="position:relative;left:200px;height:50x;">
<table style='border:1px solid #990000;height:60px;'><tr><td>some text</td></tr></table>
width |
values are: auto | length | percentage
| allows one to specify a width for the element <img src="captsm.gif" style="position:relative;left:100px;"> <img src="captsm.gif" style="position:relative;left:200px;width:50x;">
<table style='border:1px solid #990000;width:185px;'><tr><td>some text</td></tr></table>
max-width |
values are: length | percentage
| allows one to specify a maximum width for the element <img src="captsm.gif" style="position:relative;left:100px;"> <img src="captsm.gif" style="position:relative;left:200px;max-width:50x;">
max-height |
values are: length | percentage
| allows one to specify a maximum height for the element <img src="captsm.gif" style="position:relative;left:100px;"> <img src="captsm.gif" style="position:relative;left:200px;max-height:50x;">
min-width |
values are: length | percentage
| allows one to specify a minimum width for the element <img src="captsm.gif" style="position:relative;left:100px;"> <img src="captsm.gif" style="position:relative;left:200px;min-width:150x;">
min-height |
values are: length | percentage
| allows one to specify a minimum height for the element <img src="captsm.gif" style="position:relative;left:100px;"> <img src="captsm.gif" style="position:relative;left:200px;min-height:150x;">
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||