degarrin VIP
Total posts: 33
08 Oct 2015 22:35

I know this topic has come up before and you all are working on it for Cobalt 9, and I have read what I can find on it here and through the external links that have been shared. But I must be missing something or just not understanding it, because no matter what adjustments I add into my custom .scss file, I cannot seem to get anything to work on adjusting the layout of the physical printing. I would be thrilled to get the layout all pretty, but would be satisfied for now to have it so the comment box, the print button, and my chat button do not appear on the printed version.

Here is what already comes in my main template's bootstrap.min.css file:

@media print {
* {
    background: transparent none repeat scroll 0 0 !important;
    box-shadow: none !important;
    color: #000 !important;
    text-shadow: none !important;
}
a, a:visited {
    text-decoration: underline;
}
a[href]::after {
    content: " (" attr(href) ")";
}
abbr[title]::after {
    content: " (" attr(title) ")";
}
.ir a::after, a[href^="javascript:"]::after, a[href^="#"]::after {
    content: "";
}
pre, blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
}
thead {
    display: table-header-group;
}
tr, img {
    page-break-inside: avoid;
}
img {
    max-width: 100% !important;
}
@page {
    margin: 0.5cm;
}
p, h2, h3 {
    orphans: 3;
    widows: 3;
}
h2, h3 {
    page-break-after: avoid;
}
}

Any suggestions? I am using RocketTheme Callisto v.1.1.2 and Gantry v.5.1.5.

Thank You! Angela

Last Modified: 12 Oct 2015


pepperstreet VIP
Total posts: 3,837
09 Oct 2015 01:58

Hello Angela,
either add a special print.css to your component.php file ... or extend the @media print declarations in your custom.css

Just inspect the page source in question, search your elements you want to not print.
Add their ID/class names to your css file. Give them a display property of "none".

For instance the comments container on this forum:

div#comments {
 display: none;
}


degarrin VIP
Total posts: 33
12 Oct 2015 19:50

Thank you Pepperstreet, that helps. I have been pulled away to work on something else, but I will play with it in the next day or so and update my post.

Thanks again! Angela

Powered by Cobalt