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.

http://orderfiltersnow.com/
LVL 2
Paul RiskoAsked:
Who is Participating?
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" />
</div>

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
0

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!
0
Paul RiskoAuthor Commented:
Works but now my drop down menu is gone.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

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

0
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;
}
0
Chris StanyonWebDevCommented:
Yeah - that should do it.
0
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="http://www.orderfiltersnow.com/images/headers/mainlgog.jpg" 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.
0
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.
0
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
CSS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.