Creating a print style sheet

Document Type:

 Informational

PanelSet for ASP.NET

Product Name:

 PanelSet for ASP.NET

Product Versions:   

 All

Last Updated:

 3/27/2011

Document ID:

 278

Summary

How to apply custom media styles (At Rules) to a Panel.

Details

When printing a page that uses PanelSet for its layout, you may need to apply custom styles to a Panel to force it to print its entire contents if it is clipped and uses scroll bars. This is standard practice for layouts that utilize DIV elements with scrolling behavior.

Web developers apply the media "At Rule" in order to accomplish custom print styles. This can be inline:

<style>
  @media print
  {
    #Panel1
    {
      position:relative ! important;
      top:0px ! important;
      overflow:visible ! important;
    }
  }
</style>

Or print styles can be linked externally:

<link rel="stylesheet" type="text/css" href="print.css" media="print" />

You may notice that along with the CSS attributes is the "! important" directive. This helps ensure that these styles will take precedence over local style attributes. Local style attributes are defined in PanelSet, either statically or via JavaScript when the page is rendered. Without the "! important" directive, your print styles may not be applied in deference to equivalent local styles.

Coalesys Newsfeed News Archive

11/15/2012 - New Release: Navigation-UI v6.0 (All Platforms)

2/19/2012 - Update: WebMenu v5.1.98 and PanelBar v4.0.98 (All Platforms)

3/15/2011 - Windows Internet Explorer 9 released, supported by Coalesys DHTML products.

10/7/2010 - Update: Mercury-UI (All Platforms), and WebMenu 5.1 introduced!

11/18/2009 - Update: WebMenu v5.0.96 and PanelBar v4.0.96 (All Platforms)