homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

Need to resize a DIV for printing
Tir Tinuviel

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

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)


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


Tir Tinuviel

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

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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved