• Resolved lotfi.elhafi

    (@lotfielhafi)


    Hi,

    I’m trying to add a printing style but it doesn’t work. I added the code below to my child theme css:

    @media print {
    /* Here you can add specific styles for the printing */
    	body {
    		background: #FFF;
    		color: #000;
    		margin: 0;
    	}
    	#header, #comments, #sidebar, #footer {
    		display: none;
    	}
    	#content {
    		display: block;
    	}
    }

    When I try to print, everything is displayed in the preview, not just the main content. Did I miss something? Should I add the media print in the header? How?

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Style for printing’ is closed to new replies.