All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.w3c.css.properties.CssMarginTop

java.lang.Object
   |
   +----org.w3c.css.properties.CssProperty
           |
           +----org.w3c.css.properties.CssMarginSide
                   |
                   +----org.w3c.css.properties.CssMarginTop

public class CssMarginTop
extends CssMarginSide

   'margin-top'

Value: <length> | <percentage> | auto
Initial: 0
Applies to: all elements
Inherited: no
Percentage values: refer to parent element's width

This property sets the top margin of an element:

   H1 { margin-top: 2em }
 

A negative value is allowed, but there may be implementation-specific limits.


Constructor Index

 o CssMarginTop()
Create a new CssMarginTop
 o CssMarginTop(CssExpression)
Create a new CssMarginTop
 o CssMarginTop(CssMarginSide)
Create a new CssMarginTop with an another CssMarginSide

Method Index

 o addToStyle(CssStyle)
Add this property to the CssStyle.
 o equals(CssProperty)
Compares two properties for equality.
 o getPropertyInStyle(CssStyle, boolean)
Get this property in the style.
 o getPropertyName()
Returns the name of this property

Constructors

 o CssMarginTop
 public CssMarginTop()
Create a new CssMarginTop

 o CssMarginTop
 public CssMarginTop(CssMarginSide another)
Create a new CssMarginTop with an another CssMarginSide

Parameters:
another - The another side
 o CssMarginTop
 public CssMarginTop(CssExpression expression) throws InvalidParamException
Create a new CssMarginTop

Parameters:
expression - The expression for this property.
Throws: InvalidParamException
Values are incorrect

Methods

 o getPropertyName
 public String getPropertyName()
Returns the name of this property

Overrides:
getPropertyName in class CssProperty
 o addToStyle
 public void addToStyle(CssStyle style)
Add this property to the CssStyle.

Parameters:
style - The CssStyle
Overrides:
addToStyle in class CssProperty
 o getPropertyInStyle
 public CssProperty getPropertyInStyle(CssStyle style,
                                       boolean resolve)
Get this property in the style.

Parameters:
style - The style where the property is
resolve - if true, resolve the style to find this property
Overrides:
getPropertyInStyle in class CssProperty
 o equals
 public boolean equals(CssProperty property)
Compares two properties for equality.

Parameters:
value - The other property.
Overrides:
equals in class CssProperty

All Packages  Class Hierarchy  This Package  Previous  Next  Index