Forum Moderators: not2easy

Message Too Old, No Replies

Printing problem for CSS styled page

printing

         

mespejo

6:10 am on Jul 25, 2006 (gmt 0)

10+ Year Member



I have a vertical menu on my page and I want to print the page as well as convert it to pdf file. The problem is that the navigation menu was printed out on all pages. I only want to appear the menu once on the first page and no more on the succeeding pages. How can I do that?

Much appreciate your help.

ram1

10:34 pm on Jul 25, 2006 (gmt 0)

10+ Year Member



Give the body of your first page an id -


<body id="page_home">

then in your print stylesheet (you will need to specify separate print styles) add the rule:


#nav { display: none; }
#page_home #nav { display: block!important; }

You will have to create styles to compensate for the missing nav in this case, but if you wanted you could swap display: none; for visibility: hidden; which does not adjust the layout, and swap it for visibility: visible; on the first page.

mespejo

12:59 am on Jul 27, 2006 (gmt 0)

10+ Year Member



Thanks for the suggestion, ram1 :)