2022.2

Table Of Contents
l
.frontside
l
.backside(doesnotapplytosimplexdocuments)
l
.contentpage
l
.nocontentpage
TheMediaBoxcontainstheMasterPageobjectsandsectionbackgrounds.Thismeansthatthese
classescanonlybeusedtoformataMasterPageandsectionbackground.Theydonotletyouchange
theformattingofelementsresidinginthemaintextflow(e.g.a<h1>elementonpage3).
Formatting Master Page objects depending on the sheet position
ThefollowingCSSrulesetsthecolorof<h1>elementsonaMasterPagewhenthatMasterPageis
presentonthefrontofasheet.
.frontside h1 {
color: green;
}
Thenextstyleruleisabitmorespecific:itcolors<h1>elementsonaMasterPagewhenthatMaster
PageisappliedtothefrontofasheetinSection1:
[section='Section 1'] .frontside h1 {
color: green;
}
Thefollowingrulehides<h1>elementsonthebackofasheetonwhichnocontent(fromthemaintext)
isallowed.
.backside.nocontentpage .h1 {
display: none;
}
Print section background selector
WhenyouinspectaPrintsectioninabrowser,youwillseethatithasa<divid="pages">elementas
thefirstchildofthe<body>element.Insidethis<div>thereareoneormoreMediaBoxes:elements
withtheclasspage_mediabox.EachMediaBoxcontainstheMedia,sectionbackgroundandMaster
Pagethatapplytoonepage(see"Media"onpage465,"MasterPages"onpage462and"UsingaPDF
fileorotherimageasbackground"onpage451).
IntheMediaBox,aPrintsectionbackgroundisan<img>elementwiththeol_pdf_datamapper_input
class.ItssrcattributereferencesthePDFfilethatcontainstheimageandthepageparameterisused
toselectaspecificpageinthatPDF(asaPDFcancontainmorethanonepage).
Forexample:
Page 828