1<?php 2// $Header: /cvsroot/html2ps/css.bottom.inc.php,v 1.6 2006/11/11 13:43:52 Konstantin Exp $ 3 4require_once(HTML2PS_DIR.'value.bottom.php'); 5 6/** 7 * 'bottom' 8 * Value: <length> | <percentage> | auto | inherit 9 * Initial: auto 10 * Applies to: positioned elements 11 * Inherited: no 12 * Percentages: refer to height of containing block 13 * Media: visual 14 * Computed value: for 'position:relative', see section Relative 15 * Positioning. For 'position:static', 'auto'. Otherwise: if 16 * specified as a length, the corresponding absolute length; if 17 * specified as a percentage, the specified value; otherwise, 'auto'. 18 * 19 * Like 'top', but specifies how far a box's bottom margin edge is 20 * offset above the bottom of the box's containing block. For 21 * relatively positioned boxes, the offset is with respect to the 22 * bottom edge of the box itself. Note: For absolutely positioned 23 * elements whose containing block is based on a block-level element, 24 * this property is an offset from the padding edge of that element. 25 */ 26 27class CSSBottom extends CSSPropertyHandler { 28 function CSSBottom() { 29 $this->CSSPropertyHandler(false, false); 30 $this->_autoValue = ValueBottom::fromString('auto'); 31 } 32 33 function _getAutoValue() { 34 return $this->_autoValue->copy(); 35 } 36 37 function default_value() { 38 return $this->_getAutoValue(); 39 } 40 41 function get_property_code() { 42 return CSS_BOTTOM; 43 } 44 45 function get_property_name() { 46 return 'bottom'; 47 } 48 49 function parse($value) { 50 return ValueBottom::fromString($value); 51 } 52} 53 54CSS::register_css_property(new CSSBottom); 55 56?>