I am trying to print only the ‘.content’ of a post without header, footer and sidebar in full width. With customization to @media print, the header, footer and sidebar is removed. But a blank left column is displayed where the sidebar used to be. I have added code for the content margin and width. But it isn’t working. Can’t see what’s happening.
I would appreciate some help.
Screenshot of the executed print preview
Link to the webpage which I want to print Demo Inc
This is the code I have tried..
@media print{
#header,
#footer,
.sidebar,
.nav-container{display:none;!important}
.content{display:block;!important;}
.content{ margin-left:0;
width:100%
}
Bmsahitya Assam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.