css 3

Icon

A comprehensive CSS 3 reference guide, tutorial, and blog
Are you a CSS expert? Want to contribute? Contact us

CSS MARKER-OFFSET

In :before or :after pseudo-elements, the ‘display’ property can be set to “marker” to allow content to be paired with other content (usually iteratively, such as with the ‘list-style-type’ property behavior. An element’s content creates a “principal” rendering box. The “marker” for the “principal” box should be formatted in a single-line outside the “principal” box. The “marker” box should allow the border and padding properties, but not margins.

The ‘marker-offset’ property gives a horizontal distance between the marker box and the “principal” rendering box, measured between the adjacent neighboring edges of the two boxes

 

Example

li:before { display: marker; marker-offset: 5px }

<ul><li style=”marker-offset: 5px”>this is some text</li></ul>

 

Possible Values

Value Description
inherit Explicitly sets the value of this property to that of the parent
auto The browser determines the distance between the near edges of the marker box and the content box
[length] A specified length value is used to determines the distance between the near edges of the marker box and the content box

 

 

One Response

  1. clyrock says:

    What the text(”this is some text”) looks like after implemented the example code above?

Leave a Reply

Pages

Sponsors


CSS3.com



Please help CSS3.com stay alive and running

Bad Behavior has blocked 2318 access attempts in the last 7 days.