I have the following HTML with an inline style of visibility:hidden
.I would like to print the element when ctrl+p
. It works with display:none
but I do not want to use it as I would like the element to take up space on the page.
Following is my implementation
<div
className="d-print-block mt-2"
style={{
alignItems: 'flex-start',
marginBottom: '1rem',
visibility: 'hidden' // changing it to display:none works fine
}}
>
<div className="col-12">
<div>This is hidden but needs to be printed</div>
</div>
</div>