CSS DHTML XML CGI PHP
A Z CSS . com

CSS Print Media Tutorial

The force of print + CSS

So you've mythical yourself a cutting line lattice page. What following ? Chipper possibly you appetite your visitors to be able to print pages in a undeniable style. Bulky graphical content can be removed, background hue changed and directing items removed, infact anything to beget a printer affable narration of your page. All this can de done with CSS.

Printer comradely pages with CSS
CSS can effectively be used to contrive formated documents ready for print.
This is fairly a facile development and all we hold to conclude is assemble and attach a moment style folio with the attributes required for our print output. In consequence we hold a stylesheet that controlls what you inspect on the shade and a style event that controls what is printer. Easy......

Markup changes
So, we testament get already attached an apparent stylesheet in the imagination regulation of our document. It should flash something analogous this:

The tag here has an attribute called media which can corner a departure of options such as screen or print. For a filled discription of media types please prospect our glossary here.

Now, provided we thirst for to seperate our media into two types - one for the screen and one for print we must replace our code:

We posses forthwith defined a separate style period for both screen and print.

The css sheets are momentarily called screen.css and print.css. This method when a lacework browser requests your mesh folio screen.css kicks in for your screen display. When a prayer is trumped-up for a print preview or print the style is defined by print.css.

This is not an automatic advance and we will enjoy to address a au courant style stage called print.css that works in accordance with your beginning html document.

In the consequent divide we study at the CSS involved in setting up a leaf for print output.

CSS Changes
Lets immediately cut a accelerated case at the not difficult changes we compulsion to produce in our stylesheet and how we can discover an characteristic print sheet.

Now is the extent to define fair what we longing to carry off in our print output. Maybe we hope for our website header and logo to be come out on screen however be omitted on paper.

The easiest approach to carry through this is design a crowd or id called 'header' and define a disparate style for screen.css and print.css.

Lets own a eyeful at how the enactment may look:

Your header id for screen.css may attending liking this:

#div header {
font-family:arial;
margin: 0px 0px 2px 2px;
font-size: large;
font-weight: bold;
background-colour: #000000;
border-colour: #ffffff 1px solid;
}

Your header id for print.css may observe adore this:

#div header {
font-family:arial;
font-size: 20px;
font-weight: bold;
}

The CSS rule for screen.css defines font, margin, font size, font weight, background colour and limit colour.

The CSS statute for print.css defines one the font, font amount and font weight. To save the guest ink we carry omitted the background and column and reduces the font size.

If your purpose is enormous on lively banners or illumination movies we can application a akin manner to grant the banners to be shown on the screen only.

Your screen.css stylesheet could encompass all kinds of attributes for the advertisment such as string colour, blop shadows and position.

In your print.css stylesheet you would demand to drop the advertisement from printing so in you would habitat the following:

#div.ads {
display:none;
}

This CSS law will illiminate the advertisement from the print output.

Hope this helps:

http://www.css-help.com



Keywords:

print, print output, css print, print media, screen print, print css, print preview, print replace, print pages, print fairly
Comments: [0] / Post comment:

New York Times Co. Profit Drops 12% as Print Advertising Shrinks - BusinessWeek

Moneycontrol.com New York Times Co. Profit Drops 12% as Print Advertising Shrinks BusinessWeek 2 (Bloomberg) -- New York Times Co., publisher of the namesake newspaper, reported a 12 percent drop in fourth-quarter profit, capping a year marked by shrinkage of print advertising. Net income fell to $58.9 million, or 39 cents a share, ... Fourth-Quarter Profit and Revenue Declined at the New York Times Company New York Times Co. reports lower 4Q net income

Print dresses are Spring- 2012 winners - Examiner.com

Print dresses are Spring- 2012 winners Examiner.com It's time to go shopping for print previews before you make your decision on what to buy this season. "The florals and the animal prints are our number one best sellers. Every women loves the animal prints . I do not think that they ever left the ...

Mistake in print run and spot-checking leads to exposure of private ... - Patriot-News

Mistake in print run and spot-checking leads to exposure of private ... Patriot-News An error with the print run and a failure to thoroughly spot check the forms is to blame, Kathleen Pavelko said. Corrected forms were sent this week, she said. The mistake did not expose any of the donors' social security numbers or credit card ...
    rss