Creating a Print CSS
By default, the corev4.css file includes two print @media rules to remove unnecessary artifacts from printed pages, including ribbon and navigation (see Listings 16.5 and 16.6). The @media rule in Listing 16.5 defines SharePoint CSS classes and the @media rule in Listing 16.6 defines a SharePoint CSS ID. When you define print CSS, including in the @media rule and separate print.CSS file, you can include CSS classes, IDs, and elements, such as
• .ms-listdescription {display: none}
• Body{background:white;}
• Body.v4master{background:blue;}
• .ms-pagetitleareaframe TD{display:none;}
• Body #s4-titlerow{display:none;}
Note
The @media rule, defined by the W3C, enables you to include print classes in the same CSS file used for ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access