Add logo when printing from browser

This may sound a little odd but what I want to do is print a logo (jpg) with the article content when the user selects print from the gray print drop down menu on the page. Same logo for every page printed from this site.

I don't want the logo in the article.
Paul RiskoAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Chris StanyonWebDevCommented:
Normally, what you'd do here is to add a stylesheet for just the print media.

<link rel="stylesheet" media="print" href="myPrintStyles.css">

You could then include a DIV in your page with an ID of printLogo:

<div id="printLogo">
   <img src="myLogo.jpg" />

Open in new window

In your normal stylesheet, set it to be hidden:

#printLogo { display: none; }

And then in you print stylesheet, set it to display block:

#printLogo { display: block; }

This way it will only show up when you print

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Paul RiskoAuthor Commented:
Ok. I will do that later. Thanks!
Paul RiskoAuthor Commented:
Works but now my drop down menu is gone.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Chris StanyonWebDevCommented:
In your template.css, line 1, you've set a lot of other things to display: none, including header, footer and nav - the nav is what contains your dropdown.

All I meant was that you needed to hide the #printLogo using it's own rule:

#printLogo {
  display: none; 

Open in new window

Paul RiskoAuthor Commented:
Like so should be fine?

img {
      max-width: 100%;
      width: auto \9;
      height: auto;
      vertical-align: middle;
      border: 0;
      -ms-interpolation-mode: bicubic;
#printLogo {
  display: none;
#map_canvas img,
.google-maps img {
      max-width: none;
Chris StanyonWebDevCommented:
Yeah - that should do it.
Paul RiskoAuthor Commented:
Do you know if there is a way I can include

<link rel="stylesheet" media="print" href="/print_styes.css">
<div id="printLogo"><img src="" alt=""/></div>

Every time I start a new article with out having to paste it every time?
It's not a big deal to paste it. I'm just afraid I'll forget later on.
Chris StanyonWebDevCommented:
No idea. If your site is template based, then you could add it to a template, but it'll depend on how your site is set up.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.