[tip]Delete non-useful cpg divs while printing [tip]Delete non-useful cpg divs while printing
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

[tip]Delete non-useful cpg divs while printing

Started by flapane, June 04, 2012, 04:25:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

flapane

Just a little tip I applied in my website and I want to share:
If an user wants to print your cpg gallery home or any other cpg page, you'd better provide him a clean version of it for printing purposes.
You can do this by applying this code in your stilesheet:
/*non mostrare quando si stampa il documento*/
@media print {
#cpgChooseFlags { display:none }
}


In this example the language selector won't appear on the printed version of the page.
Substitute the code in this example with any other <div> you want to disappear while printing.
Flapane
www.flapane.com

Gallery
www.gallery.flapane.com

flapane

See the difference between original and ready-to-be-printed version using the @media print { } css feature
Flapane
www.flapane.com

Gallery
www.gallery.flapane.com