Created
May 10, 2011 22:25
-
-
Save chriseppstein/965507 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style media="print"> | |
#printed-image { content: url(/path/to/image.png); } | |
</style> | |
<img id="printed-image" src="/images/spacer.gif"> |
does this mean you need to have non-semantic markup in your tempaltes?
@sxtxixtxcxh That's pretty damn smart.
@barraponto I don't see why this would force non-semantic markup.
that img tag, in most browsers, will display a gif which means nothing at all. right? can it be done with any other selector, like selecting a paragraph or a div and use :after to place the content?
@barraponto: I think it can. I used an img to be sure the browser would print it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
bonus: you can use this with google analytic's tracking gif, just be sure you set query string params correctly in your stylesheet.