Sākums » css

css #1 [Print Stylesheet]

01.05.2010 15:53 387 skatījumi Viens komentārs

Pāris interesanti resursi par to kā veidot CSS Print Stylesheet

Video:
Screen shot 2010-05-01 at 16.50.13

lasāmviela:

Lots of web pages have a link to a print-friendly version. What many of them don’t realise is that there’s no need because you can set up a second CSS document to be called up when a user prints the page.

So, your page header should contains links to two CSS documents, one for the screen, and one for printing:

The first line of code calls up the CSS for the screen (notice the inclusion of media=”screen”) and the second line calls up the CSS for the printable version (using media=”print”).

So, what commands should you put in this second CSS document? To work it out, open a blank document and save it as printstyle.css. Next, point the screen CSS command to this document so that the command reads:
.

Now just keep entering CSS commands until the display on the screen matches how you want the printed version to look. You’ll certainly want to make use of the display: none command for navigation, decorative images and non-essential items. For more advice on this, read Print Different3, which also mentions the other media for which you can specify CSS files.

http://www.webcredible.co.uk/user-friendly-resources/css/css-tricks.shtml

http://www.webdesignschoolreview.com/css-printing.html

http://kilianvalkhof.com/2008/css-xhtml/a-useful-print-stylesheet/

http://css-discuss.incutio.com/?page=PrintStylesheets

Autors: Roberts Mozgis (rob)

Web izstrādātājs ar vairāku gadu pieredzi. Esmu strādājis pie daudziem interesantiem projektiem Latvijā un ārpus tās. Specializācija PHP, JavaScript, CSS, Html, kā viss ap datubāzēm.

VN:F [1.2.3_620]
Rating: 0.0/5 (0 votes cast)

Ir ko teikt?

Vari izmantot:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Raksta komentāru RSS