Capt. Horatio T.P. Webb
Cascading Style Sheet Reference -- SPRING 2000
DISC 3371 Transaction Processing I
Last Updated 2PM 11/11/2007
init tout

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:

  1. Typical CSS specification in the HTML document heading.
    <HEAD>
    <STYLE TYPE="text/css">
    ...
    element_type or selector { property1 : value ;
                               property2 : value ;
    .
    .
    .
                               propertyn : value }
    ...
    element_type or selector { property1 : value ;
                               property2 : value ;
    .
    .
    .
                               propertyn : value }
    ..
    </STYLE>
    </HEAD>
    

    There are three other ways to specify a style sheet:

  2. Linked CSS

    You may link to a style sheet that is stored at another URL. The format is:

    <HEAD>l
    <LINK REL=STYLESHEET TYPE="text/css" HREF="http://some_other_url" TITLE="some_title">
    </HEAD>

    Here the style sheet at the other URL must begin and end with <STYLE> tags.

  3. Imported Style Sheets

    You may also use an imported style sheet that can be merged with an existing style specification in the document. Format is:

    <HEAD>
    <STYLE TYPE="text/css">
      @import url(http://some_other_URL);
    </STYLE>

    All @ commands (@import included) must preceed all other rule sets.

  4. STYLE inside the <BODY> tags

    Lastly, you may insert style rules inside a specific HTML tag in the body of the document.

    <some_tag STYLE="property : value ; ...; property : value" >

    For example:

    <P STYLE="color:blue">some text</P>

    will make the text inside the <P> display in blue, like this:

    some text

  5. CSS Classes

    Often rather than an ALL or nothing approach to specifying style parameters we often wish to have some HTML elements styled in one fashion and other HTML objects styled differently. To do this we use CSS classes. This involves assigning a "class name" to an HTML element in the style sheet. You can use any name. This defines a particular style for the class and then referencing the "class name" in the HTML.

    Georgraphically, in the style sheet we assign an HTML element a class name:

    HTML_element.class name { CSS Specification}

    and then in the HTML element tag, we specify that the element is of this "class":

    <HTML element tag name class="class name">

    For example suppose we want some paragraphs to be in a red font. In the style sheet we could say:

    p.redcolor {color:red;}

    and then on the HTML page:

    <p class="redone"> content here</p>

    "content here" would appear in a red font.

  6. Psuedo-Classes

    A link in HTML (i.e., the <a href="..."> tag) has several possible "states". These values may be set as attributes of the <BODY> tag:

    <BODY link="#0000ff" vlink="#00ff00" alink="#ff0000">

    Here the unvisited link is blue, a visited link is green and an active link is red (i.e., a link color WHILE it is being active followed). Alertnatively you may control the link actions by CSS. CSS provides not only color specifications for the three link states -- but also adds the ability to change the color of the link when the mouse rolls over the link (called "hover"). In CSS these properties are set by:

    a:link {color specificaton}
    a:visited {color specificaton}
    a:active {color specificaton}
    a:hover {color specificaton}

    Using the same colors as the body tag above (and adding a magenta hover) yields:

    a:link {color:#0000ff;}
    a:visited {color:#00ff00;}
    a:active {color:#ff0000;}
    a:hover {color:#ff00ff;}

    SOME LINK TEXT

    We can combine classes with psuedo-classes to allow use to specify many different link types. To do this we just add the psuedo-class action to the class name in the style sheet:

    a.alt:link {color:#ff0000;}
    a.alt:visited {color:#0000ff;}
    a.alt:active {color:#ffffff;}
    a.alt:hover {color:#000000;}

    The HTML tage would then be:

    <a class="alt" href="#">SOME LINK TEXT TOO</a>

    which would appear as:

    SOME LINK TEXT TOO

CSS Properties
CSS Property
CSS Values
font    font assigns up to six possible values for the font property in a single css declaration.

font-style

 
Choose from:

normal
italic
oblique

font-variant

 
Choose from:

normal
small-capital

font-weight

 
Choose from:

normal
bold
bolder
lighter
100
200
300
400
500
600
700
800
900

font-size/
line-height

Choose from:

length plus
cm|mm|in|pt|px

percentage

font-family

 
Choose:

one or more
family names
separated
by commas

 

e.g., <span style="font:italic normal bold 20px comic sans ms;">some text</span>, makes this:
some text
font-style values are: normal | italic | oblique

e.g., <span style="font-style:oblique;">some text</span>, makes this:
some text
font-family values are: family-name | generic-name , family-name | generic-name , ...

multiple font-family values may be specified.
e.g., comic sans ms, arial, helvetica

generic serif sans-serif cursive fantasy monospace
family Times New Roman
Bodoni MT
Garamond
Poor Richard
Georgia
Century
Trebuchet MS
Comic Sans MS
Arial
Verdana
Impact
Futura
Eras Light ITC
Gill Sans MT
Lucida Sans
Berlin Sans FB
Blackadder ITC
Bradley Hand ITC
Brush Script MT
Edwardian Script ITC
Forte
Freestyle Scipt
French Script
Gigi
Kunnstler Script
Lucida Handwriting
Mistral
Palace Script
Script MT Bold
Stencil
Jokerman
Cottonwood
FB Reactor
Ravie
Old English Text MT
Courier
Courier New
Lucida Console
Lucida Sans Typewriter

e.g., <span style="font-family:Stencil;">some text</span>, makes this:

 

some text
font-size values are: xx-small | x-small | small | medium | large | x-large | xx-large | length

e.g., <span style="font:20px;">some text</span>, makes this:
some text
font-weight values are: normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900

bigger numbers are MORE bold. e.g., <span style="font-weight:600;">some text</span>, makes this:
 
some text
font-variant values are: normal | small-caps

e.g., <span style="font-variant:small-caps;">Some Text</span>, makes this:
Some Text
TEXT Properties
word-spacing values are: normal | some-length (px, em ex)

e.g., <span style="word-spacing:16px;">some text</span>, makes this:
 
some text
letter-spacing values are: normal | some-length (px, em ex)

e.g., <span style="letter-spacing:16px;">some text</span>, makes this:
 
some text
text-decoration values: none | underline | overline | line-through | blink

e.g., <span style="text-decoration:overline;">some text</span>, makes this:
 
some text
vertical-align values are: baseline | sub | super | top | text-top | middle | bottom | text-bottom | percentage

e.g., Some <span style="vertical-align:super;"> text</span>, makes this:
 
Some text
text-transform values are: none | capitalize | uppercase | lowercase

e.g., <span style="text-transform:capilatize;"> some text</span>, makes this:
 
some text
text-align values are: left | right | center | justify

e.g., <div style="text-align:right;">some text</div>, makes this:
some text
line-height values are: normal | number | length | percentage

e.g., <div style="line-height:45px;"> some<br>text</div>, makes this:
some
text
text-indent values are: length | percentage

e.g., <div style="text-indent:45px;"> some<br>text</div>, makes this:
 
some
text
COLOR and BACKGROUND Properties
color color formats are:
  • #rrggbb (e.g., #00aa00 -- three 2 hexadecimal character hexadecimal (00 thru ff) for red green and blue)
  • #rgb (e.g., #0c0 -- each single hexadeecimal digit is double up, so #48a is converted to #4488aa)
  • rgb(x,y,z) where x,y and z are integer betweens 0 and 255 inclusive corresponding to none(0) to maximum intensity(255) for red green then blue (e.g., rgb(204,0,0) is a medium bright red)
  • rgb(y%,y%,y%) where y is a number between 0.0 and 100.0 inclusive (e.g., rgb(0%,80%,0%))
  • color names
    click here for the 16 CSS 1 Color Names (17 if you count orange)
    click here for the 147 CSS 2 Color Names

e.g., <span style="color:#cc9966;"> some text</span>, makes this:
 
some text
background-color values are: color | transparent

e.g., <span style="background-color:#cc9966;"> some text</span>, makes this:
 
some text
background-image values are: url(url inside these paraenteses)

e.g., <div style="width:300px;height:200px;background-image:url(http://www.bauer.uh.edu/parks/captsm.gif);"> some text</div>, makes this:
 
some text
background-repeat values are: repeat | repeat-x | repeat-y | no-repeat

e.g., <div style="border-style:solid;border-color:#000000;border-width:1px;width:400px;height:200px;background-image:url(http://www.bauer.uh.edu/parks/captsm.gif);"> some text</div>, makes this:
 
some text
background-attachment values are: scroll | fixed

e.g., <div style="height:200px;width:300px;background-attachment:fixed;background-image:url(http://www.bauer.uh.edu/parks/captsm.gif);"> some text</div>, makes this:
 
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


e.g., <div style="height:200px;width:300px;background-position:top center;background-attachment:fixed;background-image:url(http://www.bauer.uh.edu/parks/captsm.gif);"> some text</div>, makes this:
 
some text
Note that the background as shown in this layout is offset 50 pixels horizontally (the original image is 100x100, so 50% is 50 pixels) horizontally as compared to the previous background-attachment section
CLASSIFICATION Properties
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

e.g., <span style="display:list-item;"> some text</span>, makes this:
 
some text
white-space values are: normal | pre | nowrap

e.g., <span style="white-space:pre;"> some        text</span>, makes this:
 
some text
list-stylelist-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

e.g., <ol><span style="list-style-type: lower-roman;"><li> some text<li> more text ><li> even more text</ol></span>
  1. some text
  2. more text
  3. even more text
list-style-image values are: none | url( )

e.g., <span style="list-style-image: url(cssredball.gif);"><li> some text>
  • some text
  • more text
  • even more
  • 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.


    e.g.,
    <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:
    1. 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
    2. 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
    BOX Properties
    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:
    • the total width of the box is: margin-left + border-left + padding-left + (width of the box content) + padding-right + border-right + margin-right
    • the total height of the box is: margin-top + border-top + padding-top + (height of the box content) + padding-bottom + border-bottom + margin-bottom

    • Here is the styled example of a DIV block that has:
      • a 10 pixel margin;
      • a 10 pixel blue border and;
      • a 10 pixel padding
      all inside a single cell table. The text is in a SPAN block with a red background color. The HTML is:

      <center>
      <table border="0" cellspacing="0" cellpadding="0"><tr><td>
      <div style="margin:10px;border:10px solid blue;padding:10px;background-color:white;">
      <span style="background-color:red;"><b>SOME TEXT CONTENT WITH A RED BACKGROUND</b></span>
      </div></td></tr></table>
      </center>

      The table renders as:

      SOME TEXT CONTENT WITH A RED BACKGROUND

    margin margin is a composite property that allows one to specify any or all of the four margin details below.
    1. If one values is used for margin, then the value applies to all.
    2. If two values are used for margin, then the first value applies top and bottom, the second to left and right.
    3. If three values are used for margin, then the first value applies top, the second to right, and the third to the bottom. The missing value for the left margin is then copied from the right's value.
    4. If four values is used for margin, then the values apply to top, then right, then bottom, then left (this is clockwise from the top).
    margin-top values are: auto | height | percentage
    height can be expressed in em, ex, px or cm, mm, in, pt, pc

    e.g.,<br>some<br> <p style="margin-top: 36px;">text</p>
    some

    text

    margin-right values are: auto | height | percentage
    height can be expressed in em, ex, px or cm, mm, in, pt, pc

    e.g.,
    <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

    e.g.,<p style="margin-bottom: 36px;">some</p> <p>text</p>

    some

    text

    margin-left values are: auto | height | percentage
    height can be expressed in em, ex, px or cm, mm, in, pt, pc

    e.g.,
    <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
    1. If one values is used for padding, then the value applies to all.
    2. If two values are used for padding, then the first value applies top and bottom, the second to left and right.
    3. If three values are used for padding, then the first value applies top, the second to right, and the third to the bottom. The missing value for the left margin is then copied from the right's value.
    4. If four values is used for paddiing, then the values apply to top, then right, then bottom, then left (this is clockwise from the top).

    e.g.,
    <table border='1'><tr><td><p style="padding: 0px 6px 12px 18px;">some text</p></td></tr></table>

    some text


     
    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

    e.g.,
    <table border='1'><tr><td><p style="padding-top: 36px;">some text</p></td></tr></table>

    some text


     
    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

    e.g.,
    <table border='1'><tr><td><p style="padding-right: 36px;">some text</p></td></tr></table>

    some text


     
    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

    e.g.,
    <table border='1'><tr><td><p style="padding-bottom: 36px;">some text</p></td></tr></table>

    some text


     
    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

    e.g.,
    <table border='1'><tr><td><p style="padding-left: 36px;">some text</p></td></tr></table>

    some text


     
    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)

    e.g.,
    <table style='border:3px dashed #aa0000;'><tr><td>some text</td></tr></table>

    some text

     
    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).
    1. If one value is used for border-width, then the value applies to all.
    2. If two values are used for border-width, then the first value applies top and bottom, the second to left and right.
    3. If three values are used for border-width, then the first value applies top, the second to right, and the third to the bottom. The missing value for the left border-width is then copied from the right's value.
    4. If four values is used for border-width, then the values apply to top, then right, then bottom, then left (this is clockwise from the top).
    note: border-style must be specified for this property to render

    e.g.,
    <table style='border-style:solid;border-width:2px 4px 6px 8px;'><tr><td>some text</td></tr></table>

    some text

     
    border-top-width values are: thin | medium | thick | length
    note: border-style must be specified for this property to render

    e.g.,
    <table style='border-style:solid;border-top-width:6px;'><tr><td>some text</td></tr></table>

    some text

     
    border-right-width values are: thin | medium | thick | length
    note: border-style must be specified for this property to render

    e.g.,
    <table style='border-style:solid;border-right-width:6px;'><tr><td>some text</td></tr></table>

    some text

     
     border-bottom-width  values are: thin | medium | thick | length
    note: border-style must be specified for this property to render

    e.g.,
    <table style='border-style:solid;border-bottom-width:6px;'><tr><td>some text</td></tr></table>

    some text

     
    border-left-width values are: thin | medium | thick | length
    note: border-style must be specified for this property to render

    e.g.,
    <table style='border-style:solid;border-left-width:6px;'><tr><td>some text</td></tr></table>

    some text

     
    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).
    1. If one value is used for border-color, then the value applies to all.
    2. If two values are used for border-color, then the first value applies top and bottom, the second to left and right.
    3. If three values are used for border-color, then the first value applies top, the second to right, and the third to the bottom. The missing value for the left border-color is then copied from the right's value.
    4. If four values is used for border-color, then the values apply to top, then right, then bottom, then left (this is clockwise from the top).
    note: border-style must be specified for this property to render

    e.g.,
    <table style='border-style:solid;border-color: #cc0000 #0000aa #0000aa #cc0000;'><tr><td>some text</td></tr></table>
    some text

     
    border-top-color values are: color
    note: border-style must be specified for this property to render

    e.g.,
    <table style='border-style:solid;border-top-color:aa0000;'><tr><td>some text</td></tr></table>
     
    some text

     
    border-right-color values are: color
    note: a border-style must be specified for this property to render

    e.g.,
    <table style='border-style:solid;border-right-color:aa0000;'><tr><td>some text</td></tr></table>
     
    some text

     
    border-bottom-color values are: color
    note: a border-style must be specified for this property to render

    e.g.,
    <table style='border-style:solid;border-bottom-color:aa0000;'><tr><td>some text</td></tr></table>
     
    some text

     
    border-left-color values are: color
    note: a border-style must be specified for this property to render

    e.g.,
    <table style='border-style:solid;border-left-color:aa0000;'><tr><td>some text</td></tr></table>
     
    some text

     
    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).
    1. If one value is used for border-style, then the value applies to all.
    2. If two values are used for border-style, then the first value applies top and bottom, the second to left and right.
    3. If three values are used for border-style, then the first value applies top, the second to right, and the third to the bottom. The missing value for the left border-color is then copied from the right's value.
    4. If four values is used for border-style, then the values apply to top, then right, then bottom, then left (this is clockwise from the top).

    e.g.,
    <table style='border-style:solid dashed none ridge;'><tr><td>some text</td></tr></table>
     
    some text

     
    border-top-style values are:values are: none | dotted | dashed | solid | double | groove | ridge | inset | outset

    e.g.,
    <table style='border-top-style:double;'><tr><td>some text</td></tr></table>
     
    some text

     
    border-right-style values are:values are: none | dotted | dashed | solid | double | groove | ridge | inset | outset

    e.g.,
    <table style='border-right-style:dashed;'><tr><td>some text</td></tr></table>
     
    some text

     
    border-bottom-style values are:values are: none | dotted | dashed | solid | double | groove | ridge | inset | outset

    e.g.,
    <table style='border-bottom-style:ridge;'><tr><td>some text</td></tr></table>
     
    some text

     
    border-left-style values are:values are: none | dotted | dashed | solid | double | groove | ridge | inset | outset
     

    e.g.,
    <table style='border-left-style:groove;'><tr><td>some text</td></tr></table>
     
    some text

     
    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).
     

    e.g.,
    <table style='border-top: 3px solid green;'><tr><td>some text</td></tr></table>
     
    some text

     
    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).

    e.g.,
    <table style='border-right: 3px dashed red;'><tr><td>some text</td></tr></table>
     
    some text

     
    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).

    e.g.,
    <table style='border-bottom: 3px double blue;'><tr><td>some text</td></tr></table>
     
    some text

     
    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).

    e.g.,
    <table style='border-left: 3px dotted magenta;'><tr><td>some text</td></tr></table>
     
    some text

     
    float values are: left | right | none
    specifies the alignment of text or images relative to a parent
     

    e.g.,
    <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.
     

    e.g.,
    <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>
     
    some left
    some right

     
    CSS 2 Properties
    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
    default is an arrow
    auto is browser determined
    pointer is a hand image
    move indicates the element is to be moved
    x-resize indicates that the element located in the x direction is to be resized
       compass directions are: n, s, e, w, ne, nw, se, or sw.
    text indicates that text can be selected
    wait indicates the program is busy (clock or huorglass)
    help indicates that help is available (question mark or balloon)

     


    e.g.,
    format of links below is <a href="#" style="cursor:cursor_type;">cursor_type</a>

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

    position values are: static | relative | absolute | fixed

    specifies the type of positioning for an element

    • static (default) means normal HTML flow
    • relative means to its normal position
    • absolute means at specific co-ordinates relative to its block
    • fixed means at specific co-ordinates relative to the browser window

    e.g.,
    <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)
     


    e.g.,
    <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)
     


    e.g.,
    <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,
    if position is abosulte, the distance from the bottom of the element to the bottom of its container

    Note that the red ball is OUTSIDE the container

     


    e.g.,
    <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
     


    e.g.,
    <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


    e.g.,
    <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
     

    e.g.,
    <img src="captsm.gif" style="position:relative;left:100px;">
    <img src="captsm.gif" style="position:relative;left:200px;height:50x;">




    e.g.,
    <table style='border:1px solid #990000;height:60px;'><tr><td>some text</td></tr></table>
     
    some text

     
    width values are: auto | length | percentage
    allows one to specify a width for the element
     

    e.g.,
    <img src="captsm.gif" style="position:relative;left:100px;">
    <img src="captsm.gif" style="position:relative;left:200px;width:50x;">




    e.g.,
    <table style='border:1px solid #990000;width:185px;'><tr><td>some text</td></tr></table>
     
    some text

     
    max-width values are: length | percentage
    allows one to specify a maximum width for the element
     

    e.g.,
    <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
     

    e.g.,
    <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
     

    e.g.,
    <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
     

    e.g.,
    <img src="captsm.gif" style="position:relative;left:100px;">
    <img src="captsm.gif" style="position:relative;left:200px;min-height:150x;">