Print Preview

B

Bruno

Hello!

I have 5 columns of a table: leftleft, left, center, right and rightright:
The columns left and right are 3 px width, the width of the columns
leftleft and rightright is unknown. I used a "trick" for the center column
to push the colums leftleft and rightright to the edges of the screen:
width=100% for the center column.

<table width=100%>
<tr>
<td>$leftleft</td>
<td width='3px'></td>
<td width='100%'>$center</td>
<td width='3px'></td>
<td>$rightright</td>
</tr>
</table>

This "nonsense" width calculation works fine for most browsers. However the
Print Preview will cut out some of the right text so we will not see the
whole page.

I can not set the width of the columns leftleft and rightright to a
meaningful value because I want them to be dynamic in width depending on the
content of $leftleft and $rightright (yes, a php script provides the values)

What can I do to have a most flexible screen layout AND a correct print
Preview?

Thanks for any help / ideas

Regards Bruno
 
B

Beauregard T. Shagnasty

Bruno said:
Hello!

I have

posted this twice. I guess everyone is trying to figure out what you
are trying to do, and wishing you had posted a URL to the page.
 
B

Bruno

hi there,
here's the URL

http://www.bhs-schulungen.de/test/index.php

Imagine the most left column being a cell for navigation for different
languages. In Englisch, you can use small words, in other languages, the
words are up to 400% longer!

The most right cell will contain some hints, the middle cell will carry the
main message.
So far I could not find another possiblility to force the center cell to
grap most of the space, especially when the cell contains just a few
characters.

I want the whole table being printed entirely as well (print preview to test
it).

Thanks for any hints

Bruno

Beauregard T. Shagnasty said:
posted this twice. I guess everyone is trying to figure out what you
are trying to do, and wishing you had posted a URL to the page.

and here the code lines


<table width='100%' border='0'>
<tr valign='top'>
<td bgcolor='#dddddd'><nobr>hello *)</nobr></td>
<td width='3px' bgcolor='#99aadd'></td>
<td width='100%'><nobr>center text which pushes<br>the colums leftleft and
rightright to the edges<br>of the screen</nobr></td>
<td width='3px' bgcolor='#99aadd'></td>
<td><nobr>right text</nobr></td>
</tr>
</table>
<hr>

<table width='100%' border='0'>
<tr valign='top'>
<td bgcolor='#dddddd'><nobr>hello world *)</nobr></td>
<td width='3px' bgcolor='#99aadd'></td>
<td width='100%'><nobr>center text which pushes<br>the colums leftleft and
rightright to the edges<br>of the screen</nobr></td>
<td width='3px' bgcolor='#99aadd'></td>
<td><nobr>right text</nobr></td>
</tr>
</table>
<hr>

<table width='100%' border='0'>
<tr valign='top'>
<td bgcolor='#dddddd'><nobr>Hello world, this is a sunny day
*)</nobr></td>
<td width='3px' bgcolor='#99aadd'></td>
<td width='100%'><nobr>center text which pushes<br>the colums leftleft and
rightright to the edges<br>of the screen</nobr></td>
<td width='3px' bgcolor='#99aadd'></td>
<td><nobr>right text</nobr></td>
</tr>
</table>
<hr>
<h5>*) This column is as small as possible, depending on the length of
text. That's why I can not really write a width = 'x%' into it. </h5>
<hr>
 
B

Beauregard T. Shagnasty

Bruno said:

In my Firefox, the print preview of that page looks the same as the
screen display.
Imagine the most left column being a cell for navigation for different
languages. In Englisch, you can use small words, in other languages,
the words are up to 400% longer!

The most right cell will contain some hints, the middle cell will
carry the main message.

Rather than using tables, I'd suggest you look for a good three-column
CSS layout, instead of abusing tables for display. Tables are for data.

Here is a nice sample:
http://www.benmeadowcroft.com/webdev/csstemplates/3-column.html
Google for lots more, but be careful and only choose one that uses em or
percentages for the column widths, else they will not expand well if the
visitor resizes the text.
 
B

Bruno

In my Firefox, the print preview of that page looks the same as the
screen display.
Thank you for your answer and sorry for the long delay on my side.

on http://www.bhs-schulungen.de/a_new/index.php?main_menu=2&sub_menu=0 you
see an example of differences between the screen and printpreview display. I
use IE and 1024 x 768 pixels. a basic layout like that on
http://www.bhs-schulungen.de/test/index.php
gives the table cells which act like "frames for the logo, the heading, the
navigation and the body.

Happy New Year2006

Bruno
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,108
Latest member
AlbertEste
Top