tags:

views:

414

answers:

2

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.

+1  A: 

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

@media print
{
    /* Print CSS rules here */
}
technophile
+4  A: 

You should define media in the CSS file:

@media print
{
    p
    {
        ...
    }

    ...put styles here.
}
gius
So then I would have a screen.css which encapsulates the style within @media screen { ... } and a printer.css when encapsulates the styles within @media print { ... }I guess that makes sense.
BlackMael
This is not the most elegant solution for mobile devices where bandwidth is a concern and now the device has to download the styles for all media types.
JustEngland