Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Post-Kicker, -Byline & -Footer (http://forum.bytesforall.com/forumdisplay.php?f=17)
-   -   [SOLVED] Theme's Print Function (http://forum.bytesforall.com/showthread.php?t=2426)

abroadinspain Jul 13, 2009 10:26 PM

[SOLVED] Theme's Print Function
 
I have a "print this post" link below my byline on each post and am using the standard print function included in the theme (I set it up in the kicker/byline/footer section of the theme's options).

The problem is that every time I print a post, the text comes out of the printer in a one-inch strip along the left hand side of the paper; in other words, the text does not fill the paper.

Does anyone know why I'm getting this weird behavior when I click the print this post link? Shouldn't the link format the text correctly and send it to my printer so that it fits nicely on the page and not in a one-inch strip along the side of the page?

You can see what I'm talking about by visiting my blog at http://abroadinspain.com and trying to print any post using the print function below the byline.

Thanks in advance for your help!

juggledad Jul 14, 2009 02:49 PM

You could use the %wp-print and the wp-print plugin. see the description at ATO-Post/Page Info Items

The page is a big table and it looks like the print code you are using is defaulting to the width of the left column

Flynn Jul 15, 2009 02:14 PM

This is corrected in newer versions. In you 3.2 replace the PRINT section in style.css with this:

HTML Code:

/* ------------------------------------------------------------------
---------- PRINT STYLE ----------------------------------------------
------------------------------------------------------------------ */

@media print {

    body {
        background: white;
        color: black;
        margin: 0;
        font-size: 10pt !important;
        font-family: arial, sans-serif;
        }

    div.post-footer {
        line-height: normal !important;
        color: #555 !important;
        font-size: 9pt !important;
        }

    a:link,
    a:visited,
    a:active,
    a:hover {
        text-decoration: underline !important;
        color: #000;
        }
       
    h2 {
        color: #000;
        font-size: 14pt !important;
        font-weight: normal !important;
        }
       
    h3 {
        color: #000;
        font-size: 12pt !important;
        }
       
    #header,
    #footer,
    .colone,
    .colthree,
    .navigation,
    .navigation-top,
    .navigation-middle,
    .navigation-bottom,
    .wp-pagenavi-navigation,
    #comment,
    #respond,
    .remove-for-print {
        display: none;
        }

    td#left, td#right {
        width: 0;
        }

    td#middle {
        width: 100%;
        }

    /* 4 hacks for display:none for td#left and td#right for all all browsers except IE. */

    *:lang(en) td#left{
        display: none;
        }
       
    *:lang(en) td#right{
        display: none;
        }

    td#left:empty {
        display: none;
        }

    td#right:empty {
        display: none;
        }

}   


abroadinspain Jul 16, 2009 03:45 PM

Thank's Flynn! That code did the trick!

Thanks again!


All times are GMT -6. The time now is 05:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.