how can I print a web page with all its css style attached to the page?

别来无恙 提交于 2019-12-01 02:29:04

If you have media="screen" on your link element, try to remove it or replace with media="all".

Take a look at this and this, that should help.

Basically you need to add a css print statement.

<link rel="stylesheet" href="URL to your print.css" type="text/css" media="print" />

CSS style-sheets have an attribute media. It specifies to what media this css is applicable. Possible media types are listed here.

<style type="text/css" media="all">
   @import "myCss.css";
</style>

OR

<link rel="stylesheet" type="text/css" media="print" href="print.css">
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!