0

I have a page with two media types, Print and screen. I also want to allow user to email the page to themselves but instead of the screen media type, I want to allow them to email the Print media type which would include some text that is hidden in the screen media type.

I was able to email the page DOM of the screen media type by using document.body.getElementsByClassName('content')[0].innerHTML }.How can I do the same thing but with print media type?

NGLN
  • 43,011
  • 8
  • 105
  • 200
Alex Wu
  • 25
  • 1
  • 9

1 Answers1

0

Media types are defined in the stylesheets, not the html.

Emails do not support all CSS styling, or media types. Emails are not web pages. Much of how your email will be rendered will depend on the mail client (gmail, yahoo etc.)

See: Campaign Monitor CSS Guide.

Diodeus - James MacFarlane
  • 112,730
  • 33
  • 157
  • 176
  • What I need is basically email screenshot of the page, except I want the Print media type version instead of screen media type. What I have done now is get the dom via javascript and send it to the mail client. I am open to suggestion if there is another way to do it. – Alex Wu Dec 17 '13 at 17:49
  • Make all of the print media declaration as INLINE styles on your HTML. See: http://stackoverflow.com/questions/13975087/email-clients-ignoring-internal-style-sheet – Diodeus - James MacFarlane Dec 17 '13 at 18:27