CSS marker-offset property

CSS marker-offset property

Description

The marker-offset property defines the distance from the nearest edge of a marker to its associated primary box.

Unfortunately, this property is not supported in IE 6 or Netscape 7.

Possible values

  • length − Any length value.

  • auto − Default value, set automatically by the browser.

Applies to

All elements with a marker display attribute.

DOM Syntax

object.style.markerOffset = "5px" 

Example

This is an example –

<html> 
<head> 
</head> 

<body> 
<ul style = "list-style: inside square; marker-offset:2em;"> 
<li>Maths</li> 
<li>Social Science</li>
<li>Physics</li>
</ul>

<ol style = "list-style: outside upper-alpha; marker-offset:2cm;">
<li>Maths</li>
<li>Social Science</li>
<li>Physics</li>
</ol>
</body>


html>

This will produce the following result −

CSS marker-offset property

Leave a Reply

Your email address will not be published. Required fields are marked *