settings PK CSS tab not working
-
Hello DK
I am a non-programmer trying to learn how to use the custom CSS in WordPress DK PDF.I have some of it working but seem to been having problems with some of the CSS commands.
As I understtand it, the pkpdf-index.php trumps or overwites style-css in my child theme. I have tried several themes.
My first problem is that I cannot get the settings TAB PK PDF to work. Nothing is recognized.
Some of the CSS placed into dkpdf-index.php works OK but I am having issues with table formating.
This works OK in style.css but does not pass to the PDF Button.
[ Moderator note: code fixed. Please wrap code in the backtick character or use the code button. ]
table, table tr, table tr td, table th, table th td { /* border:hidden; */ border: 4px solid blue; line-height:100%; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; padding-top:0px; padding-bottom:0px; }
The PDF Button displays the heavy blue border ONLY in the TH row.
https://bradandpeggy.com/?page_id=3523
I have tried pasting the above CSS into pkpdf-index.php but no change in display.
Thanks any help you can offer.
Brad——————————————————————–
HERE IS WHAT I HAVE IN MY dkpdf-index.php
——————————————————————–<?php /** * dkpdf-index.php * This template is used to display the content in the PDF * * Do not edit this template directly, * copy this template and paste in your theme inside a directory named dkpdf */ ?> /* Brad's copy started Oct 21 2015 */ <html> <head> <link type="text/css" rel="stylesheet" href="<?php echo get_bloginfo( 'stylesheet_url' ); ?>" media="all" /> <style type="text/css"> body { background:#FFF; font-size: 100%; /* BEGIN CUSTOM CSS ------------------------------------------- */ table, table tr, table tr td, table th, table th td { /* border:hidden; */ border: 4px solid blue; line-height:100%; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; padding-top:0px; padding-bottom:0px; valign="top"; } .bm_th { border: 4px solid navy; color:yellow; } p { font-family: "Times New Roman"; font-size: 8px; } /* END CUSTOM CSS ------------------------------------------- */ } </style> </head> <body> <?php global $post; $pdf = get_query_var( 'pdf' ); $post_type = get_post_type( $pdf ); // if is attachment if( $post_type == 'attachment') { ?> <div style="width:100%;float:left;"> <?php // image $image = wp_get_attachment_image( $post->ID, 'full' ); if( $image ) { echo $image; } ?> <?php // caption, description $thumb_img = get_post( get_post_thumbnail_id() ); if( $thumb_img ) { echo '<p style="margin-top:30px;">Caption: ' . $thumb_img->post_excerpt .'</p>'; echo '<p>Description: ' . $thumb_img->post_content .'</p>'; } ?> <?php // metadata $metadata = wp_get_attachment_metadata( $post->ID ); if( $metadata ) { $metadata_width = $metadata['width']; $metadata_height = $metadata['height']; $image_meta = $metadata['image_meta']; echo '<p style="margin-top:30px;">Dimensions: '. $metadata_width .' x '. $metadata_height .'</p>'; // image metadata foreach ($image_meta as $key => $value) { echo $key. ': '. $value .''; } } ?> </div> <?php } else { $args = array( 'p' => $pdf, 'post_type' => $post_type, 'post_status' => 'publish' ); $the_query = new WP_Query( apply_filters( 'dkpdf_query_args', $args ) ); if ( $the_query->have_posts() ) { while ( $the_query->have_posts() ) { $the_query->the_post(); global $post; ?> <?php the_content(); ?> <?php } } else { echo 'no results'; } wp_reset_postdata(); } ?> </body> </html>
- The topic ‘settings PK CSS tab not working’ is closed to new replies.