Project / Support Center
Welcome, Guest. Please login or register. October 19, 2019, 02:47: AM
Home Help Search Login Register
D-Web Web Site Creator D - Web Web Site Creator On-line HTML Editor No Programming knowledge required. Web Global Net PayPal-Cart Shopping Cart System PayPal - Kart Shopping Cart System for E-Commerce over the internet, that's easy to use. Web Global Net Newsletter Manager Newsletter Manager On-line Newsletter Creator with Email Subscriber Management.
Ring Central Discount
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  CSS Related  |  Topic: Hiding or showing an element or section of a page when printing - Bootstrap 4 0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Send this topic Print
Author Topic: Hiding or showing an element or section of a page when printing - Bootstrap 4  (Read 189 times)
admin
Administrator
******
Offline Offline

Posts: 162


« on: August 29, 2019, 07:15: PM »

use this as the class for a DIV wrap of the section or element you do not what to show when printing.

<div align="center" class="d-print-none">  Content or Element </div>

class="d-print-none" is built into Bootstrap 4 so no need to add it to your print.css file if you have one  class="d-print-none" will stop something from printing.

Example:This will stop a button from showing when printing.

<div class="d-print-none"><div style="text-align: center; "><a href="new_listing.php?ag=<?php echo $_GET['ag']; ?>"  class="SBAbuttongreen3 noprint">Click here[/url]</div></div>


To hide on screen and show on print

<div class="d-none d-print-block"> </div>




<div class="d-print-none">Screen Only (Hide on print only)</div>
<div class="d-none d-print-block">Print Only (Hide on screen only)</div>
<div class="d-none d-lg-block d-print-block">Hide up to large on screen, but always show on print</div>
« Last Edit: September 05, 2019, 07:19: PM by admin » Report to moderator   Logged

The Unknown Webmaster
Pages: [1] Go Up Send this topic Print 
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  CSS Related  |  Topic: Hiding or showing an element or section of a page when printing - Bootstrap 4 « previous next »
Jump to:  


Login with username, password and session length
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!