WordPress.org

Forums

[resolved] [Plugin: Print Friendly and PDF Button] Custom CSS not working (6 posts)

  1. svsdnb
    Member
    Posted 1 year ago #

    Hello. I have created my custom CSS to float the image to the left instead of center and also to add a width of 60% to shrink the image down. This however is not working. The css to hide the page title and source url is however working so I know it's reading the css file.

    I used the code from your site and even included !important. Can you please help?

    I'd like to make the image smaller and float left.

    /* This will align images to the left */
    
    #printfriendly img{
        float:left;!important
        margin-top: 12px;
        margin-right: 12px;
    	width:60%;!important
    }
  2. kmaar
    Member
    Posted 1 year ago #

    First of all, the "!important" declaration needs to be before the semi colon - "float: left !important;"
    Secondly, I'm not sure which part you are trying to style, but the plugin markup is in 2 nested iframes and the custom css file will only be included in the innermost iframe.

  3. svsdnb
    Member
    Posted 1 year ago #

    First of all, I'm just following their instructions as they provided where they put !important outside of the semi colon.
    Secondly, again per their instructions this is placed in it's own style sheet called printfriendly.css.
    Thirdly, thanks for being abrasive and a douche in a 2 month old thread.

  4. saxamo
    Member
    Posted 12 months ago #

    Did you ever get this solved? I am trying to use the custom css as well and just add a height and width to the image. It does not seem to be calling the css file. I like the plugin but support for it is silly.

    Thanks for any information

  5. the.wanegain
    Member
    Posted 4 months ago #

    Hello,

    I am running into the same issue. Neither my images nor my custom css is being included on the PDF, even if this works like a charm if I print.

    How did you solve this please ?

    Thanks

  6. saxamo
    Member
    Posted 4 months ago #

    Unfortunately no.. To be honest as great as these plugins are, the end result is that they wither and die eventually.. Just do yourself a favor. Learn how to create a print.css yourself and if someone clicks on the page or in the browser and wants to print your page it will always be correct and compliant. Don't waste your time on plugins that usually end up not being updated and are a security risk at some point. Do the work yourself and keep the amount of plugins you use to a minimum, as little as possible..

    http://www.smashingmagazine.com/2011/11/24/how-to-set-up-a-print-style-sheet/

    Good luck

Topic Closed

This topic has been closed to new replies.

About this Topic