Title: Custom CSS not working
Last modified: December 16, 2022

---

# Custom CSS not working

 *  Resolved [connor212](https://wordpress.org/support/users/connor212/)
 * (@connor212)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/custom-css-not-working-96/)
 *     ```wp-block-code
       I'm adding custom CSS via the plugins custom CSS input but none of the changes are applied to the PDF preview. Am I doing something wrong with my CSS selectors? 
   
       CSS I'm using:
   
   
   
       @media print {
       @page {
       margin: 5mm !important;
       }
       }
   
       @media print {
   
       #printfriendly #pf-content .blockImage{
   
       width:150px !important;
       }
       }
   
       #printfriendly #pf-content .blockImage{
   
       width:150px !important;
       }
   
       #pfcom-print #pf-content .blockImage{
   
       width:150px !important;
       }
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcustom-css-not-working-96%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Print & PDF by PrintFriendly](https://wordpress.org/support/users/printfriendly/)
 * (@printfriendly)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/custom-css-not-working-96/#post-16296462)
 * Hi,
 * The custom CSS URL is not available – [https://redstagtimberlab.co.nz/wp-content/uploads/printfriendly_1671153608.css](https://redstagtimberlab.co.nz/wp-content/uploads/printfriendly_1671153608.css)
 * Do you have some firewall setting blocking this?
 *  Thread Starter [connor212](https://wordpress.org/support/users/connor212/)
 * (@connor212)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/custom-css-not-working-96/#post-16304279)
 * I’ve tried this with Wordfence disabled and the custom CSS input still does nothing.
   Tried it on my local so I know there’s no server security that might be blocking
   it and it still doesn’t work
 *  Plugin Author [Print & PDF by PrintFriendly](https://wordpress.org/support/users/printfriendly/)
 * (@printfriendly)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/custom-css-not-working-96/#post-16306604)
 * Custom CSS will not work for the local server for PDF as PDF is generated in 
   our server and it needs access to the CSS file. It will work for Print.
 * As I said earlier, the URL is not accessible to our server. You may be able to
   check it by opening it an incognito browser window.
 * If you are comfortable with editing template, I can provide you a solution or
   we will be releasing our next version this week which will provide a way to fix
   this without editing template.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Custom CSS not working’ is closed to new replies.

 * ![](https://ps.w.org/printfriendly/assets/icon-256x256.png?rev=2951152)
 * [Print, PDF, Email by PrintFriendly](https://wordpress.org/plugins/printfriendly/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/printfriendly/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/printfriendly/)
 * [Active Topics](https://wordpress.org/support/plugin/printfriendly/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/printfriendly/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/printfriendly/reviews/)

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)

 * 3 replies
 * 2 participants
 * Last reply from: [Print & PDF by PrintFriendly](https://wordpress.org/support/users/printfriendly/)
 * Last activity: [3 years, 5 months ago](https://wordpress.org/support/topic/custom-css-not-working-96/#post-16306604)
 * Status: resolved