Mike Lewis
Programmer
I have created a web page which includes a navigation bar down the left hand side. When the page is printed, I'd like to suppress this bar.
My normal style sheet includes the following code:
I apply this to the DIV that holds the navigation bar.
I have also created a second style sheet, for use with printed output. Here, the above code has been modified as follows:
The result is that the navigation bar does not appear during printing, which is what I want. But, in its place, I get a wide margin, extending across the left-most 8 cm of the page.
Is there any way I can hide the sidebar, and get the main text to start printing near the left-hand side of the page? Is my overall approach correct, or is there some better way of hiding elements during printing?
Thanks in advance.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
My Visual FoxPro site: www.ml-consult.co.uk
My normal style sheet includes the following code:
Code:
.sidebar
{
width: 15%;
float: left;
margin: 0;
padding: 0;
}
I apply this to the DIV that holds the navigation bar.
I have also created a second style sheet, for use with printed output. Here, the above code has been modified as follows:
Code:
.sidebar
{
width: [b]0%[/b];
float: left;
margin: 0;
padding: 0;
[b]visibility:hidden;[/b]
}
The result is that the navigation bar does not appear during printing, which is what I want. But, in its place, I get a wide margin, extending across the left-most 8 cm of the page.
Is there any way I can hide the sidebar, and get the main text to start printing near the left-hand side of the page? Is my overall approach correct, or is there some better way of hiding elements during printing?
Thanks in advance.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
My Visual FoxPro site: www.ml-consult.co.uk