1 reply [Last post]
madhukaleeckal
madhukaleeckal's picture
Offline
newbie
India
Last seen: 13 years 4 weeks ago
India
Timezone: GMT+5.5
Joined: 2008-02-22
Posts: 5
Points: 2

The past several days, I am worried about setup a printer friendly page with css. I have completed the layout, but the height I can't fix. When I try to send a printing page, unwanted area also printing.

I want to fix height of an html print page through CSS. Can I possible, please share me ur Ideas.

Thanks

****This is my css****

body {
margin: 10px 0 0 0;
height: 150px;
}
body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}

table.billprint{
border-collapse: collapse;
padding: 0;
margin: 0;
}

table.billprint td, th{
padding: 5;
margin: 0;
border: 1px solid #ccc;
}

table.billprint tr.headerentry {
background:#333;
color: #FFF;
}

****End of Css****

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 8 years 34 weeks ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

If you don't want a certain

If you don't want a certain part of the page to print, in your print stylesheet put:

#unwantedPart { display: none }

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference