Welcome to WebmasterWorld Guest from

Forum Moderators: not2easy

Message Too Old, No Replies

Need to resize a DIV for printing


Tir Tinuviel

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


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


Tir Tinuviel

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

Hot Threads This Week

Hot Threads This Month