CMPS 335 Advanced Web Publishing Cascading Style Sheets


Length Values

CSS Properties and Their Values

   Properties        Values
  -----------------------------------------------------------
    font-family       Times, New York, Garamond (serif)
                      Arial, Helvetica, Geneva
    font-size         12pt, ...
    font-style        italic, normal
    font-weight       bold, bolder, lighter, normal
    font-variant      small-caps, normal
 
    line-height       1, 2, etc. 
                      (single-spacing, double-spacing, etc)
    text-align        left, right, center, justify
    text-indent       2em, 3em, ...
    text-transform    capitalize, uppercase, lowercase, none
    text-decoration   underline, line-through, none
    
    background-color  #FFFFFF, blue, ...
    background-image  url(background1.jpg), ...
    margin-left       4em, ...
    margin            (a length value, a percentage, or auto)
    border            20px, ...

    position          absolute, relative
    top               10em, 15em, 20px, 30px, ...
    left
    width          

    background        (setting multiple background values)       
    font              (setting multiple font values)   

Examples:
It is possible to set several font properties and their values in one declaration without specifying the property names as shown in the following examples: Examples

Return to CMPS 491 Main Page
Return to Web Site Home Page