javascriptcsshtml

How to print scrollable DIV content


There is a website that I would like to print the div content of. The problem is that the div is scrollable and I'm not able to print all the content. I've tried display:none on all the divs except the one I want to print and then used the Awesome Screenshot extension for Google Chrome but it won't scroll just that div.

I've read about using Javascript in the HTML, I'm guessing, but I don't know how to use that code. It's not my website so how do I inject that code so that it will print the content?


Solution

  • I'm not sure what website you're using - but in IE you can open up F12 Developer tools, find the div you want to display, and modify the style on the fly:

    {
        display: block;
        width: auto;
        height: auto;
        overflow: visible;
    }
    

    It would then cause the div to display all it's content, without scrollbars... hopefully this helps!