Print Stylesheet in ASP.NET Themes

Last post I talked about ASP.NET Themes -- all CSS files in the theme folder will be loaded, no matter what. This makes having a matching print stylesheet a little difficult since you can't specify media types for you theme stylesheets.

Enter the @media tag. In your print.css stylesheet, you can use this tag to specify your media type in the stylsheet instead of in the <link> tag as you normally would.


@media Print 
{
	body,a {color:#000;}
}

And as an added bonus: this even works in IE 6. Who would have thought?

Posted by on 10/09 at 08:05 AM

Name:

Email:

Location:

URL:

Smileys

Remember my personal information

Notify me of follow-up comments?

Submit the word you see below:


<< Back to main