CSS Examples: display

Examples

A list with "..." added with an after marker:

  1. One
  2. Two
  3. Three

Example of a display: block element

Example of a display: inline element

Styles Used

li:after {
	display: marker;
	content: "...";
}
.header {
	color: black;
	padding-top: 0.25em;
	border-top: 3px solid black;
}
.header:before {
	display: block;
	color: gray;
	content: "New Chapter";
	margin-bottom: 0.5em;	
}
.header2 {
	color: black;
	padding-top: 0.25em;
	border-top: 3px solid black;
}
.header2:before {
	display: inline;
	color: gray;
	content: "New Chapter";
	margin-bottom: 0.5em;	
}