Question

This is a question brought up in a local user group mailing list at dot.net.nz ...

I when I create an XHTML page old-fashioned way, I used to use the following syntax for my CSS declarations:

<link rel=”stylesheet” type=”text/css” media=”screen” href=”css/screen.css” />

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

Now, since I code using ASP.NET 2.0 and beyond; I fell in love with the Themes. However, I don’t know how to do the same thing using Themes.

Was it helpful?

Solution

You should define media in the CSS file:

@media print
{
    p
    {
        ...
    }

    ...put styles here.
}

OTHER TIPS

You can declare the media type inside the stylesheets. For example, printer.css:

@media print
{
    /* Print CSS rules here */
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top