Issue
I am looking for a way to use the same stylesheet for print media as for the default onscreen layout. The advantage to me will be that I won't have to update 2 files every time I update the CSS. I would prefer to have one stylesheet and specify special rules for print media by denoting them somehow… It may not be possible, but I thought I'd put the question out there.
Solution
There's this syntax, although I honestly don't know if it's supported across all browsers (it should be):
@media print {
body {
background: #fff;
color: #000;
}
/* etc */
}
See the media part of the CSS2 standard at W3.
Answered By - Blixt
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.