WordPress.org

Support

Support » Plugins and Hacks » Jetpack by WordPress.com » [Resolved] sharedaddy doesn't use my css; prints entire page?

[Resolved] sharedaddy doesn't use my css; prints entire page?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jeremy Herve

    @jeherve

    You can control what gets printed by using the print media query in your theme.

    I see that you’ve already added some custom styles using that media query in your theme. You can add as many as you want, and the print preview will change accordingly.

    It’s worth noting that you should add your media queries to the very end of your stylesheet. This way, the print preview will pick up all your custom styles, plus your print media query modifications.

    I hope this helps.

    Jeremy,

    Thanks for your prompt reply!

    I have put the following at the bottom of my css:

    @media print {
    /* All your print styles go here */
    #header, #footer, #comments, #sidebar, #nav { display: none !important; }
    #content { display:block ;
    margin-left:0;
    float:none;
    width:auto;
    }
    }

    Still, when I use the sharedaddy print button, I get the entire page.

    How does the plugin know to find/use my css?

    Thanks,

    jan

    Plugin Author Jeremy Herve

    @jeherve

    How does the plugin know to find/use my css?

    Jetpack doesn’t actually do anything with your site’s CSS: the print button only sends the “print” command to your browser, and your browser then looks for a stylesheet.

    Could you try replacing #menu by .menu, since that container uses a class, and not an ID? You might also want to add #hellobar-banner, #hdr_img_container_other p to the list of elements to hide.

    I hope this helps.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] sharedaddy doesn't use my css; prints entire page?’ is closed to new replies.
Skip to toolbar