how to print a web page

  • Thread starter Thread starter Bart Schelkens
  • Start date Start date
B

Bart Schelkens

Hi,

On my page I have a table.
In the first column of this table I display a treeview.
In the second column I display another table with my data.

When I print my page, i get the two columns but my 2nd column doesn't fit on
my page.
What I would like is to print only the second column, so only the column
containing my data.

How can I do this?

Thx.
 
A way around it:

Create a link to open a 'print view' of just the data you want .i.e. a pop
up into another page.
And print that page
 
You can use CSS to have two styles on the same page, one for printed media
and one for screens, see below:

<style type="text/css">

@media Print { #GridId { display: none } }

@media Screen { #GridId { display: inline } }

</style>

The first line of the stylesheet (@media Print) will set the element with an
id of GridId to have a display value of none (will be hidden and removed
from the page flow) when the page is printed - hence the element will not be
printed.

and

the second line sets the same elements display property to inline on the
screen hence visible and part of the page flow.

The above is only a simple example but you can use this to radically change
the screen display from the printed version without having to have a new
page. In your example you could set the display property of the tree to be
inline for the screen and none for the printed version.

hope this helps

Mark
 

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

Back
Top