Welcome to WebmasterWorld Guest from 174.129.96.175

Forum Moderators: not2easy

Need to resize a DIV for printing

   
4:13 pm on Feb 13, 2004 (gmt 0)

10+ Year Member



Hi, I found this thread [webmasterworld.com] about resizing a DIV to fit an A4 page using the print media.

I've got the same problem, I've tried the suggestions in that thread and no joy.

The "main" DIV has a text overflow, and the print preview will only display the DIV at it's current size and includes the scroll bars - which are of course useless on a printed page - so half the text is lost.

I've tried putting all the text into a parent table and telling it to print that, but it can't break the table free of the DIV dimensions.

It wont allow me to redefine the DIV size in the print.css file.

Any ideas much appreciated!

4:59 pm on Feb 13, 2004 (gmt 0)

10+ Year Member



Try:

@media print {#nav, #otherjunk {display: none; }
#main, html, body {overflow: visible; width: auto; }
}

Adam

5:15 pm on Feb 13, 2004 (gmt 0)

10+ Year Member



Nope, no good, tried that already.
:(

Is there anyway to define the size of a DIV in the css file?

That way I could set the size for #main in the screen and print files.

 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month