at-rule

@right middle — CSS reference

Creates a generated page-margin box in the middle portion of the right margin between the corners. Use it inside @page, not in an element rule. Its content is separate from the document flow; allow enough margin space for readable text. Here a short label demonstrates its physical location.

Formal Syntax & Structure

css syntaxcss
@page { margin: 40px; @right-middle { content: "TAG"; } }

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>@right-middle</title><style>body{margin:0}#a{padding:8px;background:rgb(232,237,241);color:rgb(0,0,0);box-sizing:border-box}p{margin:0;font:12px/16px sans-serif}.next{break-before:page}@page{size:300px 400px;margin:40px;@right-middle{content:"TAG";font:10px sans-serif}}</style><body><main><p>BODY</p></main></body></html>
CSS Reference