Print without the footer and the header (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets



Message


yaronbb -> Print without the footer and the header (4/14/2007 6:52:14)

Hi to all ,
I am traying to print page without the footer and the header.

i add this script to print.css

#header
{ display: none;}
#footer
{display: none; }

but with no luck...
thenks




Tailslide -> RE: Print without the footer and the header (4/14/2007 7:52:47)

Are you adding the rules in a print stylesheet?

<link rel="stylesheet" type="text/css" media="print"  href="yourstylesheet.css" />






yaronbb -> RE: Print without the footer and the header (4/14/2007 10:37:00)

Hi,
i add this to the print page not on the css page.

<link rel="stylesheet" type="text/css" media="print" href="print.css" />




Tailslide -> RE: Print without the footer and the header (4/14/2007 10:56:35)

Hi again

Well adding such rules to the print stylesheet usually works for me - they may well be overridden if you have rules within the markup itself though. Could we see a link to the page to check what the issue might be?




yaronbb -> RE: Print without the footer and the header (4/14/2007 11:18:53)

Hi,

this is a system inside company so it is secured.

i tried this code on a blank page and it steel prints the footer and the header.





Tailslide -> RE: Print without the footer and the header (4/14/2007 11:43:59)

Ok can we see all your markup?




yaronbb -> RE: Print without the footer and the header (4/14/2007 12:04:37)

Wath do you meen by markup?

is it the css code?




Tailslide -> RE: Print without the footer and the header (4/14/2007 12:13:42)

No the markup on the HTML page itself - everything from the DOCTYPE to the closing body tag. That way we can see if there's something conflicting in there.




jaybee -> RE: Print without the footer and the header (4/14/2007 12:46:56)

You're telling the page not to print the header and the footer but you're not identifying them anywhere in your page.

I've looked through the code you posted and nowhere can I see

id="header"

or

id="footer"




yaronbb -> RE: Print without the footer and the header (4/14/2007 12:49:09)

Ok how do i do it?




womble -> RE: Print without the footer and the header (4/14/2007 14:01:34)

If the header and footer are in one of the include files you're calling, we also need to see the markup for those include files as well. Given that markup as is and those two stylesheet rules, it's impossible to guess what might be causing the issue without seeing the actual code for the header and footer.




jaybee -> RE: Print without the footer and the header (4/14/2007 14:09:21)

To use those you have to lay your page out using css. Is the page accessible on the web? If so give us a URL and we can look at it.




yaronbb -> RE: Print without the footer and the header (4/14/2007 14:10:40)

Ok didnt explain it clearly.

When i print this page on the buttom of the page the site address is printed.

How can i remove it automatically without changeing the definition in the brwoser




jaybee -> RE: Print without the footer and the header (4/14/2007 14:12:59)

Ahhh Ok completely different. I don't think you can. That's controlled by the user's browser so even if you could stop it doing it in yours, it wouldn't work in mine.




yaronbb -> RE: Print without the footer and the header (4/14/2007 14:15:13)

Ok thenks for the help




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
6.298828E-02