CSS List Properties

List Properties

Property

Description

Values

Sample Code

display

Sets how or if an element is displayed

block
inline
list-item
none

p {display: block}

list-style

Sets all of the list properties

list-style-type
list-style-image
list-style-position

ul {list-style: circle inside}

list-style-image

Sets an image as the list item marker

url
none

ul {list-style-image: myimage.gif}

list-style-position

Sets the position of the list marker

inside
outside

ul {list-style: outside}

list-style-type

Sets the appearance of the list item marker

disc
circle
square
decimal
lower-roman
upper-roman
lower-alpha
upper-alpha
none

ol {list-style-type: circle}

Internet Explorer and Gecko based browser do not render indents for list the same way. You cam make them the same wih CSS.

First you need to remove/clear the left padding and margins.
ul{
margin-left:0;
padding-left:0;
}
Now, to indent the list XXpx just add the the number of pixels to either the left padding or left margin.
ul{
margin-left:XXpx;
padding-left:0;
}
or
ul{
margin-left:0;
padding-left:XXpx;
}

Samples

Result:

The List
  • First Item
  • Second Item



This website is hosted for free by Freewebs.com - free website. Get your own Free Website now!