606646
53
Zoom out
Zoom in
Previous page
1/58
Next page
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


Need help? Post your question in this forum.

Forumrules


Report abuse

Libble takes abuse of its services very seriously. We're committed to dealing with such abuse according to the laws in your country of residence. When you submit a report, we'll investigate it and take the appropriate action. We'll get back to you only if we require additional details or have more information to share.

Product:

For example, Anti-Semitic content, racist content, or material that could result in a violent physical act.

For example, a credit card number, a personal identification number, or an unlisted home address. Note that email addresses and full names are not considered private information.

Forumrules

To achieve meaningful questions, we apply the following rules:

Register

Register getting emails for Kompozer 07 at:


You will receive an email to register for one or both of the options.


Get your user manual by e-mail

Enter your email address to receive the manual of Kompozer 07 in the language / languages: English as an attachment in your email.

The manual is 2,17 mb in size.

 

You will receive the manual in your email within minutes. If you have not received an email, then probably have entered the wrong email address or your mailbox is too full. In addition, it may be that your ISP may have a maximum size for emails to receive.

Others manual(s) of Kompozer 07

Kompozer 07 User Manual - German - 157 pages


The manual is sent by email. Check your email

If you have not received an email with the manual within fifteen minutes, it may be that you have a entered a wrong email address or that your ISP has set a maximum size to receive email that is smaller than the size of the manual.

The email address you have provided is not correct.

Please check the email address and correct it.

Your question is posted on this page

Would you like to receive an email when new answers and questions are posted? Please enter your email address.



Info