Assume a scenario where the postman comes with a letter and he has to wait for the Gate to open. He cannot deliver the letter till the gate is open
Solution
Note: we need to move the media styles to 2 separate files ex portrait.css and print.css
we need to reference it with media attribute in the link
The browser would only download print.css when it needs to print
<link href="style.css" rel="stylesheet"> <link href="portrait.css" rel="stylesheet" media="orientation:portrait"> <link href="print.css" rel="stylesheet" media="print" >
No comments:
Post a Comment