XML technologies / CSS / Advanced websites with CSS / CSS property reference / marker-offset
(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)
If the pseudo-elements :before or :after have their property display set to marker, they are positioned beside the HTML element’s contents: for :before to the left of the first line, and for :after to the right of the last line. The property marker-offset describes the gap between the content and the adjacent element (see the following figure).
Figure: The marker-offset property in the box model of an HTML element.
Note that a pseudo-element has padding and a border but no margin.
Inherited: no
See also: display
Values
Any CSS measurement or the constant auto (the browser determines the gap automatically).
Default value: auto
Compatibility
CSS version: 2
Not supported by any current browser.
Example
The following rule creates quotation marks before and after a blockquote element. The marker-offset setting puts five pixels between the content and quotation marks. If padding were declared for blockquote, its value would increase this gap.
blockquote:before, blockquote:after {
display: marker;
marker-offset: 5px;
content: '"';
font-size: 150%;
color: blue;
}
Copyright © 2006 of the German translation, dpunkt.verlag GmbH
You may print the online version for your private use.
Otherwise, this chapter from “CSS − Anspruchsvolle Websites mit Cascading Stylesheets” is subject to the same conditions as the bound edition: the work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
dpunkt.verlag GmbH, Ringstraße 19, 69115 Heidelberg