606646
53
Zoom out
Zoom in
Vorherige Seite
1/58
Nächste Seite
KompoZer User Guide 17 December 2007 Based on version 0.7.10 53
A7.1 Preliminary
A7.1.1 Introduction
When web pages are printed the re-
sults are sometimes unsatisfactory. Us-
ing CSS, authors can often improve this
significantly though browser support for
some print rules is still somewhat limited.
Although web pages are most commonly viewed on
screen site visitors sometimes wish to print them to
hard copy. This is particularly so with pages carrying
information about an order or order confirmation,
though it could occur for almost any page.
One approach is to offer a special ‘printer friendly’
version of a page. This is accessed via a link on the
page and can be formatted to produce a good printed
result. One penalty is that two versions of a page must
be maintained with concomitant risk that the content
of the two may differ; another is that the visitor may
miss the link and use the normal method of printing so
the effort is wasted.
Fortunately CSS styles provide an alternative ap-
proach. A special printer style sheet can be developed;
all pages on a site can be linked to it and no special
editing of individual pages is required. A page may then
be printed using menu instructions such as File > Print
in a browser.
Those unfamiliar with CSS should return to Section
4 of the User Guide and learn how to use Styles in
KompoZer before proceeding further.
A7.1.2 Printer style sheets
Printer stylesheets can be either internal or external
(linked) sheets. What is needed is some means of
identifying such sheets with the purpose for which they
are intended. This is done using one of two methods.
For complete style sheets specify the ‘media’
attribute for the link or style element.
For individual style rules or groups of rules use
the @media rule.
A7.1.2.1 Style sheets – media="print"
The normal form of a link to an external style sheet,
in the header of a file, is <link rel="stylesheet"
href="stylefile.css" type="text/css">.
The normal form for the opening tag for an internal
style sheet is <style type="text/css">
With KompoZer, when you open CaScadeS and
click a sheet, in the general tab the 'Media list' shows
'all'. This indicates that the styles in the file apply to all
media.
Normal style sheets can be changed to 'print' style
sheets very easily. Proceed as follows
1 Open CaScadeS
2 In the Sheets and rules window click on the
stylesheet. The general tab will be opened.
3 In the Media list box the word 'all' will appear.
Overtype it with the word 'print'.
4 Close the CaScadeS. (If the OK button is inac-
cessible click any stylesheet then any rule and
then click OK.)
If you now inspect the code it will have been
changed to:
For an external stylesheet <link media="print"
rel="stylesheet" href="stylefile.css"
type="text/css">
For an internal stylesheet <style media="print"
type="text/css">
Note. When using KompoZer, if you re-open
CaScadeS the entry in the 'Media list' box will
not have changed. This is a bug. To correct this
save the file and revert.
This shows that the sheet applies only to print
media. In the absence of a media attribute a sheet
applies to all media.
Note Although CaScadeS may show the media
list as 'all' and this is in fact a recognised media
type the stylesheet itself does not contain this
information. However it will default to applying
to all media types.
A7.1.2.2 Individual style rules – @media
Sheets that apply to all media may have individual
rules tagged to apply only to print media. To do this
rules must be enclosed in the @media rule.
For example the body could be styled to remove the
margin and background and specify the font size in
printer units
@media print {
body { margin: 0; background-image: none;
font-size: 12pt; }
}
This shows a single rule being changed but rules
may be grouped.
@media print {
p { font-size: 10pt; }
h1 { font-size: 14pt; }
h2 { font-size: 12pt; }
}
KompoZer does not offer any way of implementing
this method automatically so if you want to use the
@media rule you must edit the style sheet to add the
@media by hand. Once created CaScadeS can be used
to edit, add or delete rules.
A7.1.3 Media types
This appendix is about 'Print' type media. The CSS
specification includes the following types: Braille, Em-
bossed, Handheld, Print, Projection, Screen, Speech,
tty and TV. At present only Screen and, to a lesser
extent, print are widely supported.
An earlier version of the specification had an 'Aural'
type but this has been replaced by 'Speech'.
A7.2 Styles for printing
So what changes might you want to make to make
a page print better?
Appendix 7 - Making pages Printable
53

Brauchen Sie Hilfe? Stellen Sie Ihre Frage.

Forenregeln

Missbrauch melden von Frage und/oder Antwort

Libble nimmt den Missbrauch seiner Dienste sehr ernst. Wir setzen uns dafür ein, derartige Missbrauchsfälle gemäß den Gesetzen Ihres Heimatlandes zu behandeln. Wenn Sie eine Meldung übermitteln, überprüfen wir Ihre Informationen und ergreifen entsprechende Maßnahmen. Wir melden uns nur dann wieder bei Ihnen, wenn wir weitere Einzelheiten wissen müssen oder weitere Informationen für Sie haben.

Art des Missbrauchs:

Zum Beispiel antisemitische Inhalte, rassistische Inhalte oder Material, das zu einer Gewalttat führen könnte.

Beispielsweise eine Kreditkartennummer, persönliche Identifikationsnummer oder unveröffentlichte Privatadresse. Beachten Sie, dass E-Mail-Adressen und der vollständige Name nicht als private Informationen angesehen werden.

Forenregeln

Um zu sinnvolle Fragen zu kommen halten Sie sich bitte an folgende Spielregeln:

Neu registrieren

Registrieren auf E - Mails für Kompozer 07 wenn:


Sie erhalten eine E-Mail, um sich für eine oder beide Optionen anzumelden.


Andere Handbücher von Kompozer 07

Kompozer 07 Bedienungsanleitung - Deutsch - 157 seiten


Das Handbuch wird per E-Mail gesendet. Überprüfen Sie ihre E-Mail.

Wenn Sie innerhalb von 15 Minuten keine E-Mail mit dem Handbuch erhalten haben, kann es sein, dass Sie eine falsche E-Mail-Adresse eingegeben haben oder dass Ihr ISP eine maximale Größe eingestellt hat, um E-Mails zu erhalten, die kleiner als die Größe des Handbuchs sind.

Ihre Frage wurde zu diesem Forum hinzugefügt

Möchten Sie eine E-Mail erhalten, wenn neue Antworten und Fragen veröffentlicht werden? Geben Sie bitte Ihre Email-Adresse ein.



Info