timvb
timvb

Reputation: 152

Print Style in ASP.NET in IE8

I am trying to link a stylesheet to a masterpage in SharePoint with asp.net. It is a print-only stylesheet. The problem im having is that @media print does not work in IE8. Can i add a stylesheet in asp.net that only applies to print media?

<SharePoint:CssRegistration ID="CssRegistrationCommon"  Name="<% $SPUrl:/Style Library/CSS/common.css %>" After="corev4.css" runat="server"/>

Thanks

Upvotes: 1

Views: 527

Answers (1)

Michael Christensen
Michael Christensen

Reputation: 1786

You can also specify the media on the link for the stylesheet.

media="print"

make sure you main stylesheet points to something like screen/projector so they don't overlap

<link rel="stylesheet" href="<%= Page.ResolveUrl("~/CSS/mystyles.css") %>" type="text/css" media="screen, projection" />
<link rel="Stylesheet" href="<%= Page.ResolveUrl("~/CSS/print.css") %>" type="text/css" media="print" />

Upvotes: 1

Related Questions