homepage Welcome to WebmasterWorld Guest from 54.211.100.183
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

    
possiblity to move whole page to left in print.css
otherwise fixed width page is too wide to print
jamie

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 826 posted 7:57 am on Apr 2, 2003 (gmt 0)

hi,

we've coded our page at fixed width 760 px due to design/graphic considerations. it has coloured background, fotos encorporated, etc (we are a holiday site ;-)

the main table is

td width=170
td width=430
td=width=150

i have encased both left and right columns in divs which display: none in the print.css

however on a standard IE setup, the default margins on a page are so big that the middle column is pushed over to the right of the A4 page, and in the case where i have used only a two column layout due to using wider graphics or fotos, the right hand side of the 2nd column is cut off from being printed.

is there any way to specify a negative margin in the print.css, so the middle column is printed left aligned on the A4 page? this means it wouldn't get cutoff when i use two column layout.

or would it be better to take off the widths from the table cell and specify them in the divs, which of course could then be different in the print.css?

or any other solutions?

many thanks

 

BlobFisk

WebmasterWorld Senior Member blobfisk us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 826 posted 11:53 am on Apr 2, 2003 (gmt 0)

I personally would go with the div solution - in fact, if it's possible, you could consider dumping the table based layout for a div based laout.

Then in your print css you can change the left and width values of the centre div to make use of the who print page, and not display the left and right divs at all.

jamie

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 826 posted 12:06 pm on Apr 2, 2003 (gmt 0)

change the left and width values of the centre div to make use of the who print page

that sounds like a neat solution.

i would still leave the tables in though because 2.5% of our users use netscape 4....

i have however just tried out using div: width in my 3 column table which is 760 wide with undefined width in the <td>, and i can now position the middle div anywhere i like on a print preview.

great stuff!

many thanks

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