Svein Tjønndal
Svein Tjønndal

Reputation: 61

CSS element does not work in Chrome when printing

The following CSS works in all browsers except Chrome when printing:

.example {
  position: absolute;
  right: 0px;
  bottom: 0px;
  text-align: right
}

I am not interested in what is displayed in the browser, only what is printed.

Is this a bug? Is there a workaround?

EDIT: This seems to be a problem with Chrome's built-in PDF plugin.

Upvotes: 2

Views: 2962

Answers (1)

Gavriel
Gavriel

Reputation: 19237

your css is included in the html with something like:

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

either delete the media="screen", or add another for printing:

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

http://www.w3schools.com/tags/att_link_media.asp

Upvotes: 2

Related Questions