ArticlesReader.com Menu
Newest Articles
Most Viewed Articles
ArticlesReader.com RSS
Submit Article
Login
Signup
Search the articles

Articles Main Categories
Advice
Animals
Automobiles
Business
Career
Communications
Computer Programming
Computers
Entertainment
Environment
Family
Fashion
Finance
Food
Health & Medical
Home & Garden
Humor
Internet Business
Internet Marketing
Legal
Leisure & Recreation
Marketing
Other
Politics
Reference & Education
Religion
Self Improvement
Sports
Technology & Science
Travel
Writing
Subscribe
Receive alert message from us when new articles submitted to our site for free.

Enter your name

Enter your email

Syndicate

















Related Products
Home::CSS

CSS Print Media Tutorial

Author : Karl Regis

The power of print + CSS So you've made yourself a cutting edge
web page. What next ? Well maybe you want your visitors to be
able to print pages in a certain style. Heavy graphical content
can be removed, background colour changed and navigation items
removed, infact anything to make a printer friendly version of
your page. All this can de done with CSS.

Printer friendly pages with CSS CSS can effectively be used to
create formated documents ready for print. This is quite a
simple process and all we have to do is create and attach a
second style sheet with the attributes required for our print
output. Therefore we have a stylesheet that controlls what you
see on the screen and a style sheet that controls what is
printer. Easy......

Markup changes So, we will have already attached an external
stylesheet in the head code of our document. It should look
something like this:

/>

The tag here has an attribute called media which can have
a variety of options such as screen or print. For a full
description of media types please view our glossary here.

Now, if we want to separate our media into two types - one for
the screen and one for print we must alter our code:

media="screen" />

media="print"/>

We have now defined a separate style sheet for both screen and
print.

The css sheets are now called screen.css and print.css. This
means when a web browser requests your web page screen.css kicks
in for your screen display. When a request is made for a print
preview or print the style is defined by print.css.

This is not an automatic process and we will have to write a new
style sheet called print.css that works in accordance with your
original html document.

In the next section we look at the CSS involved in setting up a
page for print output.

CSS Changes Lets now take a close look at the simple changes we
need to make in our stylesheet and how we can create an
individual print sheet.

Now is the time to define exactly what we want to achieve in our
print output. Maybe we want our website header and logo to be
appear on screen but be omitted on paper.

The easiest way to achieve this is create a class or id called
'header' and define a different style for screen.css and
print.css.

Lets have a look at how the code may look:

Your header id for screen.css may look like 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 look like this:

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

The CSS code for screen.css defines font, margin, font size,
font weight, background colour and border colour.

The CSS code for print.css defines only the font, font size and
font weight. To save the visitor ink we have omitted the
background and border and reduces the font size.

If your site is heavy on animated banners or flash movies we can
apply a similar technique to allow the banners to be shown on
the screen only.

Typical markup for you advertisment movies could be like this:

CSS-Help<br />
T-Shirts, click here


Your screen.css stylesheet could contain all kinds of attributes
for the advertisment such as border colour, drop shadows and
position.

In your print.css stylesheet you would want to omit the
advertisement from printing so in you would place the following:

#div.ads { display:none; }

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

Hope this helps:

http://www.css-help.com


Spam emails More free articles

Related articles


  1. Introduction To Cascading Style Sheets
  2. CSS: The Basics - ID's and Classes
  3. CSS: The Basics - ID's and Classes ... Correct
  4. CSS - Maximum benefits
  5. Using CCS to Eliminate Tables
  6. CSS Print Media Tutorial
  7. Teach yourself CSS the easy way
  8. Starting Cascading Style Sheets
  9. SEO Benefits Of CSS
  10. 7 Reasons Why Using CSS is a Must
  11. Font Organizers Review, Part I
  12. CSS in Flash the return of crisp and legible fonts.
  13. CSS Browser Detection - The complete guide
  14. Cascading Stylesheets: 5 Reasons To Use CSS
  15. The Power of CSS
  16. Cross Browser Compatibility
  17. Using CSS with Tables
More related feeds
Tutorial : Comic publishing on the web
You could even take out adverts in traditional print media, although the costs will be much steeper here. Anthology contributions: This may seem odd, but if you have the opportunity, contribute to anthology comics. ...

Prototype a Magazine-Style Home Page Template with the Blueprint ...
FilmScenic Template ...

How to Make a Good Website: the Checklist
This information is particularly important for those maintaining and extending a multilingual site, but declaring the character encoding of the document is important for anyone producing XHTML/HTML or CSS. CODE W3C I18N Tutorial: ...

[Tutorial] Introduction To CSS
You also want a black text on white background design, otherwise you’ll make people print too much ink. You link to the print CSS file almost exactly the same except for the ‘ media=”print” ‘ part. ...

Web Developer Toolbox
It includes a visual example of the box model, unit reference for CSS units and the various media types CSS makes allowance for. CSS Property Index: an alphabetical index of properties as well as the various statistics and details that ...

Printing the Web: Solutions and Techniques
From Screen to Print: Creating a Print CSS in Dreamweaver; A Print CSS Primer A detailted introduction and tutorial by Kenji Ross. Print Different Quite an old article by Eric Mayer, in which he describes different media types you ...

Which CSS Grid Framework Should You Use for Web Design?
In fact, many editorial sites run by large print media publishers do apply grids to achieve a look on their websites that’s similar to their print content. Note that the vertical axis is not as well supported in CSS Grid systems, ...

Blueprintcss un Framework CSS
Framework CSS –>

DON’T MISS: The Best Graphic Design Articles from April 2008
The Highly Extensible CSS Interface The Highly Extensible CSS Interface is an excellent 4-part series of articles, now gathered together on one page for easy reference. Hartija - CSS Print Framework Hartija is “mini” CSS Framework for ...

Recycle your layouts!
NET that will make it easy to apply seperate styles for “screen”, “print” and “handheld” etc… Simply create your StyleSheet.css file in the App_Themes folder under your custom theme. Edit it by applying generic styles that will apply to ...

 


 

2007 articlesreader.com - All Rights Reserved