Hi
Is it possible using css - media="print" - to print only a specific <div> element from an html file. If so how does the print class look?
Thanks for any help
Just put [tt]display: none;[/tt] to all (*) and then give your div [tt]display: block;[/tt]. I don't know if it will work as simply, but the general idea would be:
Depending on the structure of your code, the whole process might be more difficult. For the code to work, your div must have a class set to [tt]class="MyPrintedDiv"[/tt].
Thanks for the reply. The idea is that I want to be able to print parts of the (html) document each part will have a print button which when pressed will only print that <div>. If I take your idea and create a div.MyPrintedDiv1, div.MyPrintedDiv2, div.MyPrintedDiv3 ect for each section I want to print, will it work?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.