606646
30
Zoom out
Zoom in
Previous page
1/58
Next page
KompoZer User Guide 17 December 2007 Based on version 0.7.10 30
4.5.2 Styles within a div
A div is a useful way of applying a different set of
styles within a limited region on a page. Of course a set
of classes could be designed and applied to the ele-
ments within the region but this is laborious and bloats
the code. A simpler way is to establish a set of styles for
the elements in the div and to tag them in such a way
that they apply only within the div. This is done using
an appropriate selector. Suppose the div has a class
‘divclas’. Examples of appropriate selectors are:
div.divclas p
div.divclas td
div.divclas a:visited
Or when using ids
#menu p
#contents li
These may be set up in the same way as for pseudo-
classes see section 4.2.5.2.
4.5.3 Creating a layer using a div
In section 3.10.3 we noted that 'Layers' are con-
tained in 'divs'. In fact a layer is simply a div which has
a position, and optionally a z-index, style attached.
When KompoZer creates a layer it does so by attaching
an inline style to the div.
It is equally possible to create a layer by setting up
an appropriate class and attaching this to a div.
When a layer is created in this way KompoZer
depicts it as a normal layer and renders it with a
surrounding box with sizing and position handles.
Visually it is indistinguishable from any other layer.
Such layers may, of course be precisely located and
are not subject to the vagaries of manual dragging.
Warning If a layer, created using a class, is
subsequently dragged or resized, KompoZer at-
taches an inline style. Any styling so added will
override the class styling.
5 Scripts
Scripts are short programs that are included in
HTML documents (and consist of alphanumeric and
other characters) which can change the presentation
of pages in some way. Scripts must be written in an
appropriate script language but this does not form
part of the HTML specification. Support for scripting
language depends on the browser and/or server em-
ployed.
The most common scripting language is probably
JavaScript. It runs on the browser and most modern
browsers provide support but this can sometimes be
disabled if desired by the visitor.
Another common script is PHP. This runs on and
depends on support provided by the server. When
including PHP code authors should use the fuller tags
e.g. <? php ... ?> and not the short tags <? ... ?> which
KompoZer does not support.
KompoZer allows the use of scripts on pages but
does not respond to them. The effect of the script will
not be seen on the Normal, HTML Tags or Preview view
(but the code will of course appear in Source view).
To see the code at work click on ‘Browse’.
Note Some scripts include ‘special characters’
which, when encoded by KompoZer, result in
errors when the script runs. To avoid this, in
Tools > Preferences > Advanced, check the box
‘Don’t encode special characters in attribute
values’. You can find more in formation about
this in Appendix 6
In the menu there is a command Tools > JavaScript
Console - This Guide does not cover this.
30


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