Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

a problem to print scrollable div tag

Status
Not open for further replies.

Plato2

Programmer
Dec 6, 2002
192
US
I have a scrollable div tag:
<div style="OVERFLOW-Y: scroll; OVERFLOW: scroll;"></div>
I want to print the content of the div tag but when I print the content of the div I only print the part that is visible(because my div is scrollable).

How can I print the content of the div even if the content is not visible during the scrolling?

Thanks in advance
 
What is not visible will not print. You can override that by simply specifying overflow: auto; (it will scroll when too much text is entered) for the screen and overflow: visible; (the container will expand when too much text is entered) for the printing. I have explained how to do it in this thread:
 
As far as I understand I just changed the overflow when I want to print:
Like this:
divTAG.style.overflow="visible";
window.print();
But it still doesn't print the whole content of the div tag. Any suggestions?
 
There is a small problem when I print my scrollable div and
make overflow visible it moves my div little bit to the right so the print result looks a bit different than in browser.

Is there is any reason why?

Thanks
 
I just love it how the thread wasn't good enough when I posted it but later it sufficed. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top