All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object
|
+----org.w3c.css.properties.CssProperty
|
+----org.w3c.css.properties.CssListStyle
Value: <keyword> || <position> || <url>
Initial: not defined for shorthand properties
Applies to: elements with 'display' value 'list-item'
Inherited: yes
Percentage values: N/A
The 'list-style' property is a shorthand notation for setting the three properties 'list-style-type', 'list-style-image' and 'list-style-position' at the same place in the style sheet.
UL { list-style: upper-roman inside }
UL UL { list-style: circle outside }
LI.square { list-style: square }
Setting 'list-style' directly on 'LI' elements can have unexpected results. Consider:
<STYLE TYPE="text/css">
OL.alpha LI { list-style: lower-alpha }
UL LI { list-style: disc }
</STYLE>
<BODY>
<OL CLASS=alpha>
<LI>level 1
<UL>
<LI>level 2
</UL>
</OL>
</BODY>
Since the specificity (as defined in the cascading order) is higher for the first rule in the style sheet in the example above, it will override the second rule on all 'LI' elements and only 'lower-alpha' list styles will be used. It is therefore recommended to set 'list-style' only on the list type elements:
OL.alpha { list-style: lower-alpha }
UL { list-style: disc }
In the above example, inheritance will transfer the 'list-style' values from 'OL' and 'UL' elements to 'LI' elements.
A URL value can be combined with any other value:
UL { list-style: url(http://png.com/ellipse.png) disc }
In the example above, the 'disc' will be used when the image is unavailable.
public CssListStyle()
public CssListStyle(CssExpression expression) throws InvalidParamException
public Object get()
public String getPropertyName()
public boolean isSoftlyInherited()
public String toString()
public void setImportant()
public boolean getImportant()
public void print(CssPrinterStyle printer)
public void setSelectors(CssSelectors selector)
public void addToStyle(CssStyle style)
public CssProperty getPropertyInStyle(CssStyle style,
boolean resolve)
public void setInfo(int line,
String source)
public boolean equals(CssProperty property)
All Packages Class Hierarchy This Package Previous Next Index