Table of Contents
Table of Contents ........................................................................................................................... 2
Before you begin ............................................................................................................................ 3
What's included.............................................................................................................................. 3
Extensions .................................................................................................................................. 3
Starter Page ............................................................................................................................... 4
Bonus Folder ............................................................................................................................. 4
Editable Fireworks Images ...................................................................................................... 4
CSS Files .................................................................................................................................... 4
JavaScript File........................................................................................................................... 4
Overview: How Fabrizio works ..................................................................................................... 5
The masthead ............................................................................................................................ 5
The contentwrapper ................................................................................................................. 5
The tagline ................................................................................................................................. 6
CSS Strategy.............................................................................................................................. 6
Editing and Customizing ............................................................................................................... 7
The Masthead and Tagline DIVs............................................................................................. 7
The intro section........................................................................................................................ 9
Navigation................................................................................................................................ 12
Adding Content ....................................................................................................................... 12
Image editing tips ......................................................................................................................... 13
Logo.......................................................................................................................................... 13
The Masthead Curved Graphic............................................................................................. 13
General Editing Tips .............................................................................................................. 14
Exporting Images.................................................................................................................... 15
CSS Guide .................................................................................................................................... 17
Importing CSS to hide from older browsers ........................................................................ 17
The main CSS File Analysis................................................................................................... 18
IE PC Conditional Comments ............................................................................................... 26
Style Sheet for Printing .......................................................................................................... 27
Version 4 browser CSS........................................................................................................... 29
The version 4 CSS analysis .................................................................................................... 31
Netscape Resize Fix................................................................................................................. 34
PVII Extension Help.................................................................................................................... 34
Swap Class by PVII ................................................................................................................ 34
Write V4 StyleSheet by PVII ................................................................................................. 38
Support Options ........................................................................................................................... 43
What's included
Everything you need is included. Extensions, editable Fireworks images, starter pages, CSS
files, and this User Guide (in both HTML and PDF formats).
Extensions
The following extensions can be found in the Fabrizio local files folder:
1. P7_swapClass_140.mxp
2. P7_v4StyleSheet_11.mxp
Install them before you begin working on your page. If you are not sure how to install an
extension, choose:
Note: After installing your extensions, be sure to close and restart Dreamweaver.
Bonus Folder
The Fabrizio design has its sidebar on the right. While we think this is very cool, you (or your
client) might prefer that the sidebar be on the left. The bonus folder contains a mirror image of
the Fabrizio design with the sidebar on the left. You'll also find a specific set of style sheets in
this folder - which is aptly named Lefty.
CSS Files
There are four included CSS files:
1. fab.css – The main style sheet used by version 5 and higher browsers
2. fab_v4.css - Used by version 4 browsers only
3. fab_print.css - Used for printing only
4. fab_ie5fixes.css - contains IE5.x (Windows only) fixes
JavaScript File
The PVII SwapClass script is contained in an external script file named fab.js that is linked to
your starter page.
The masthead
The masthead DIV that spans the layout's top is rather ingeniously designed. It contains the
page's level 1 heading and a special printer-optimized logo that are pushed off-screen by CSS
rules so that what you see in your browser is a background image that carries the top curve,
drop shadow, and a logo optimized for the screen. When you print the page, the background
image does not print - but the level 1 heading and the printer-optimized logo do. A special print
media style sheet moves those elements back from their off-screen resting places. As you read
through the Fabrizio CSS Guide, you'll learn exactly how this is done.
Note: A web page should logically contain a single level 1 heading inside <h1> tags. For this reason, the screen-
visible headings on your Fabrizio page are level 2 (and deeper) headings.
The contentwrapper
The layout-enveloping contentwrapper DIV is assigned a background image that serves two
purposes:
1. It carries the center portion of the shadow - the part that lies between the top curve and
bottom curve. This part of the shadow must expand and contract vertically, according to
the amount of content on the page and the size of the browser window.
2. It establishes the background colors for the maincontent and sidebar DIVs. The boxes
are separated by a dashed line, which is also part of the background image.
Note: Because the maincontent and sidebar DIVs are nested inside the contentwrapper, the contentwrapper’s
background image spans them both. This is how one background image can provide a background for two
distinct areas.
CSS Strategy
Fabrizio employs a modern and practical CSS strategy to serve style sheets specifically
optimized for the screen - and also for printers.
A main style sheet is served to modern browsers, but hidden from Netscape 4 and IE4 - which
are instead served a special style sheet that contains only styles that they support. Modern
browsers get a richly styled page powered by advanced CSS techniques, while older browsers
get a smartly styled page kept a safe enough distance from the cutting edge to be stable.
Modern browsers also benefit from the inclusion of a special print media style sheet that provides
a page optimally styled for printers. When you print (or print preview) your Fabrizio page in a
modern browser, you will see a page that is logically set up for printing - including a version of
the logo optimized for the printed page.
The actual contents of the masthead are not seen because CSS is used to move them beyond
the left edge of the window. Visitors with CSS-enabled browsers instead see the engaging
curved background image that spans the masthead. This will be fully explained in the CSS
analysis. For now, the important thing you need to know about the masthead is how to change
its hyperlink and its title.
• Insert your cursor inside the masthead's image <img> tag and the Property Inspector will
change to reflect the tag
This behavior tells SwapClass what to do by listing a set of comma separated arguments within
parentheses:
Translated in into plain English: SwapClass is instructed to look for list items <li> that have a
class of noSeeUm and to swap the class from noSeeUm to showit.
When the page loads, a JavaScript capable browser will show the Hide Intro link.
Note how the interface choices mirror the body onLoad SwapClass event we described above.
Click Cancel to close the dialog without making any changes.
• 1 - turn on toggling
• 'none' - do not look for a specific ID
• 'showit' - swap the class from showit
• 'hideit' - swap the class to hideit
• 'blockquote' - act on <blockquote> elements
• 'li' – and also act on <li> elements (which will hide and show the appropriate link)
Translated in into plain English: SwapClass is instructed to look for list items <li> and also
<blockquote> elements that have a class of showit and to swap the class from showit to hideit.
Since toggling is enabled, any <li> or <blockquote> elements that are assigned a class of
hideit will be swapped to showit.
This behavior hides the Hide Intro link, hides the intro blockquote, and shows the Show Intro link.
The Show Intro link has the same SwapClass behavior, which toggles all the settings back to
their original state - so clicking it hides the Show Intro link, shows the intro blockquote, and
shows the Hide Intro link.
Note: Because of a rendering bug in Dreamweaver, the Hide Intro link is visible in Design View. It should only
become visible in a browser as SwapClass is fired onLoad.
1. Main Navigation: Should contain links to the main sections of your site.
2. Section Navigation: Should contain contextual links to pages within a main section of
your site.
The navigation sidebar is designed to be elegant and functional. Simply add your own links and
you've got a very usable menu.
Adding Content
Adding content is as simple as opening fabrizio.htm and replacing the filler content with your
own. Everything has been prepared for you!
Fireworks Layers
We use Fireworks’ Layers panel to divide objects into logical groupings. All background objects
are in Layers that we’ve locked to prevent inadvertant re-positioning. To edit objects on a locked
Layer, open the Fireworks Layers panel and click the padlock icon. It will turn into a pencil and
you will be able to edit any object on that Layer.
Logo
The Fabrizio logo is done in Century Gothic. If you do not have that font installed, Fireworks will
present you with a Font Substitution dialog when you open the document. Simply choose a font
that is installed on your system. Futura or Lucida would be good choices.
The other font used in the images is Kroeger05_54. This font can be acquired at:
http://www.miniml.com
IMPORTANT: These three background images are each 748 pixels wide - the same width as the
contentwrapper. There is a relationship between these images and the widths assigned to the contentwrapper,
maincontent, and sidebar DIVs. If you are not yet proficient in CSS and Fireworks we recommend that you limit
your editing of these images to color and texture changes and do not attempt to alter the dimensions. For further
information and assistance in general Fireworks image editing, please feel free to log on to our Newsgroup. See
the support section of this User Guide or visit our main support page at: www.projectseven.com/support/.
• Enter fab in the File name box (if it's not already there)
• For Save as type, select Images Only
• HTML should be grayed out (unavailable) and None will be displayed
• For Slices, select Export Slices
• Selected slices only, Current frame only, and Include areas without slices should all
be unchecked
• Click the Save button
-Click OK
All the images contained in your Fireworks document (including the ones you edited) will be
exported - overwriting your existing images and reflecting all of your changes.
Setting media type to screen means that the style sheet is designed for browser screens only.
This technique also allows us to more easily deploy a special style sheet for printing (using the
print media type), which will be discussed later.
Dreamweaver MX2004 has a rather quirky behavior that prevents accurate previewing in older
browsers. When you preview in your browser using the Temporary file option, Dreamweaver
embeds the contents of imported and linked style sheets into the document's head, thereby
exposing it to all browsers and preventing a reliable local preview in Netscape 4. To preview
locally in Netscape 4:
1. Launch Netscape 4
2. Select File - Open Page
3. Browse to your saved page
@import url(../test.css);
The Dreamweaver syntax will hide CSS from all version 4 browsers except for some later versions of IE4 that
shipped with Windows 98. If you use Dreamweaver to Import your style sheet, you will need to edit the @import
directive manually to remove url and parentheses and to insert double quotes around the file path:
@import "../test.css";
If you subsequently move an HTML or CSS file using Dreamweaver's site or files panels, Dreamweaver will
overwrite your syntax and you'll need to edit it again.
Body
Sets the page background image. Sets the page background color to match the textured
background image. Sets the global font family, base font size, and font color. Font-size of 101%
may seem odd, but it serves to address some cross-browser font rendering anomalies. Margin is
set to 24px top and bottom; and 0 left and right. Padding is set to zero to turn off the default
padding Opera browsers place on the body.
The min-width property is used to address a quirk in Mozilla browsers. When a fixed width
construct is centered with CSS (using left and right margins set to auto), there is an issue when
you resize the window narrower than the centered construct: it moves off the page to the left and
the browser does not spawn a horizontal scrollbar - the content is lost off-screen. Using the min-
width property with a value equal to the width of the construct solves the problem. In this case,
the min-width value is set to 748px, which is equal to the width of the contentwrapper DIV.
body {
background-image: url(assets/fab_pbg.jpg);
background-color: #B6A29B;
color: #333333;
font-family: Arial, Helvetica, sans-serif;
font-size: 101%;
margin: 24px 0;
min-width: 748px;
padding: 0;
}
Insight: CSS shorthand permits combining values. Properties that have possible top, bottom, left, and right
values can be shortened to a single line and the direction can be omitted. This saves many keystrokes. Instead
of having four separate properties: margin-top; margin-bottom; margin-left; and margin-right - we can distill to a
single declaration encompassing all 4 values. To keep track of which value relates to which side, CSS has a
default order: Top; Right; Bottom; Left. Values are always declared clockwise from the top. If you commit this
order to memory, you will always avoid TRouBLe. When a single value is declared (as in margin: 24px;) the
value relates to all four sides. When two values are declared (as in margin: 24px 12px;), the first value relates to
both the Top and the Bottom, while the second value relates to both the Right and the Left. If three values are
declared (as in margin: 24px 24px 12px;), it means that the first value relates only to the Top; the second value
relates to both the Right and the Left; and the third value relates to the Bottom. If the Right and Left values are
different or if all four values are different, then all four must be explicitly declared.
#masthead
The masthead background spans 748 pixels and is 137 pixels high. It carries the top curve of the
layout, the top shadow, and the screen logo.
#masthead {
background-image: url(assets/fab_logobg.jpg);
background-repeat: no-repeat;
}
#maincontent
We set the maincontent DIV to float: left, which takes it out of the normal page flow and allows us
to position it as a "column". We set font size to .8em, which is calculated based upon the base
font size set in the body selector: .8em relative to 101% is the same as saying 80% of 101%. We
set line-height to 1.5em to provide a comfortable and more readable spacing between lines.
Padding is set to 0 top and bottom; and 24px left and right. We set text to align justified.
Width is set to 480px. Note the comment to the right of the declaration /*528 rendered*/. This is a
note to remind you how modern browsers render an element's box. The true rendered width of a
box is determined by adding its declared width plus its left and right padding and its left and right
borders. Here is the math:
480 (declared) + 24 (left padding) + 24 (right padding) = 528
#maincontent {
float: left;
font-size: 0.8em;
line-height: 1.5em;
padding: 0 24px;
width: 480px; /*528 rendered*/
text-align: justify;
}
#maincontent p
This descendant selector styles <p> elements within the maincontent DIV. Giving the paragraphs
16px left padding serves to indent all text 16 pixels in from all headings. If you do not want the
indentation, remove the padding property from the rule.
#maincontent p {
margin: 6px 0 12px 0;
padding: 0 0 0 16px;
}
#maincontent h2
This descendant selector applies to all <h2> elements within the maincontent DIV. H2 elements
are used for main links because the H1 element has been used in the masthead to describe the
page.
#maincontent h2 {
color: #9C8C85;
font-size: 2em;
font-weight: normal;
letter-spacing: 0.2em;
line-height: normal;
margin: 24px 0 0 0;
text-align: left;
}
Note: Focus is used by modern browsers when a link is tabbed to using the keyboard.
intro controls
The following rules are used to orchestrate the hiding and showing of the intro section.
hideit
This class is assigned to the <li> element that contains the Show Intro link so that it is hidden
when the page loads. It is also one of the classes that SwapClass swaps to as the intro section
and its control links are hidden.
.hideit {display: none;}
noSeeUm
This class is assigned to the <li> element that contains the Hide Intro link so that it is hidden
when the page loads. We use the visibility property instead of the display property to keep the
page from jumping [see note below]. Once the page is loaded, and a user begins to operate the
Hide Intro and Show Intro links, SwapClass swaps from noSeeUm to showit only the first time
the Hide Intro link is clicked. Subsequent clicks swap from showit to hideit.
.noSeeUm {visibility: hidden;}
Note: When an element is set to display: none the element becomes hidden and the space it occupied is
collapsed - causing elements below to move up. When an element is set to visibility: hidden the element is
hidden but the space it occupied does not collapse. Elements below remain where they are.
showit
This class is assigned to the <blockquote> element that contains the Intro section so that it is
visible when the page loads. It is also one of the classes that SwapClass swaps to as the intro
section and its control links are shown.
.showit {display: block; visibility: visible;}
Note: The visibility property is necessary for some early builds of IE 5 (Windows) to counteract the noSeeUm
class the first time the Hide Intro link is clicked.
#introControls li
Turns off the bullet character for the <li> elements that contain the Hide Intro and Show Intro
links.
#introControls li {list-style-type: none;}
#introSection
This is the blockquote element that contains the intro section. The background image sets a
decorative non-repeating quotation mark. Margin is set to 12 pixels top and bottom, and 0 left
and right. Line-height is set a bit tighter than the maincontent, and letter spacing is set to expand
by a small amount to make the intro text stand out. Padding is set to 40 pixels left so the text can
clear the background image. Text alignment is set to left to counteract the justified text set for the
maincontent DIV.
#introSection {
background-image: url(assets/fab_quote.gif);
background-repeat: no-repeat;
color: #95847B;
font-size: 0.9em;
letter-spacing: 0.1em;
line-height: 1.25em;
margin: 12px 0;
padding: 0 0 0 40px;
text-align: left;
}
#tagline
We set a non-repeating background to render the bottom curve and shadow. We also set tagline
to clear both sides - which allows it to display below the two floated DIVs (maincontent and
sidebar) - spanning their combined width. Height is set to 28 pixels - which is equal to the height
of the background image.
#tagline {
background-image: url(assets/fab_bottom.jpg);
background-repeat: no-repeat;
clear: both;
height: 28px;
}
#tagline p
This descendant selector applies to the paragraph inside the tagline DIV. We turn off margins
and set display to none, which hides the paragraph so that only the background image of the
tagline DIV is seen.
#tagline p {
margin:0;
display: none;
}
#sidebar
The sidebar is set to float left. Since the maincontent DIV is also set to float left, the DIV whose
markup comes first in the source code wins the left position. Since the sidebar markup comes
after maincontent's, the sidebar is rendered on the right side.
Font size is set smaller than the maincontent DIV.
Declared width is 164px and we add left and right padding (164 + 24 +24 = 212) to arrive at the
rendered width of 212px. This width, when added to the rendered width of the maincontent DIV
must be less than or equal to the declared width of the Wrapper DIV:
528 (maincontent rendered) + 212 (sidebar rendered) = 740. The contentwrapper is 748 pixels -
so we have 8 pixels to spare. Of course, there is a very good reason for this: the drop shadow.
The background image that spans the maincontent and sidebar DIVs is 748 pixels wide - with
the last 8 pixels being the drop shadow. If we added those 8 pixels to the width of the sidebar,
the sidebar DIV would extend into the shadow. This would cause the sidebar content to render
out of balance with the illusion that there was more padding on the left than on the right side.
#sidebar {
color: #866B64;
float: left;
font-size: 0.75em;
padding: 24px;
width: 164px; /*212 rendered*/
}
#sidebar h3
This descendant selector applies only to <h3> elements that are within the sidebar.
#sidebar h3 {
color: #9C8C85;
font-size: 1.2em;
margin: 24px 0 0 0;
}
#sidebar p
This descendant selector applies only to paragraphs that are within the sidebar.
#sidebar p {
margin: 6px 0 12px 0;
}
Note: Dreamweaver MX 2004 has a quirk that causes it to render both the left margin and the left padding -
making the lists appear to have double the indent. This is a known issue in Dreamweaver and does not reflect
what browsers actually render.
.navbar li
This descendant selector turns off the bullet character in the navbar lists.
.navbar li {
list-style-type: none;
}
body
IE5.x does not support auto margins to center elements but if we set text-align to center on the
body, every element on the page will be centered - along with the text inside those elements.
This is a quirky behavior specific to IE5.x that we can take advantage of.
body {text-align: center;}
By setting the body text to align center, IE5.x will center all elements within the body.
Interestingly, if we set a child element of the body - such as contentwrapper - to text-align left,
the contentwrapper will still display in the center of the window, but anything inside
contentwrapper will align left. If we set both contentwrapper and footer to text-align left, then our
page will display correctly in IE5.x.
#contentwrapper, #footer {text-align: left;}
Tip: In IE5.x Windows a box's rendered width is always the same as its declared width.
The strategy is to minimally style the page with techniques that work well for printing. An analysis
of the print style sheet follows.
body
We simply set a background color that will print well and a font. We'll leave the color to the user's
default setting, which will most surely be black.
body {
background-color: #ffffff;
font-family: Arial, Helvetica, sans-serif;
}
Font Sizes
We use a combined selector to set the font size for all items we wish to have print smaller than
the main content. Blockquotes, the footer, and the tagline will print at 80% of whatever the user's
default font size is.
Note that the tagline will actually print so make sure you've edited yours to something
meaningful.
blockquote, #footer, #tagline {
font-size: 80%;
}
#tagline
We set a border above the tagline and 12 points padding to separate it from the main body of
text. Points is a unit of measure suitable for printing.
#tagline {
border-top: 1px solid #000;
padding-top: 12pt;
}
img
Since the masthead content, including the print-optimized logo inside it, will be printing, we need
to turn off the default border that browsers render around images that are hyperlinks.
img {
border: 0;
}
h2
We set the top margin for level 2 headings to 24 points.
h2 {
margin-top: 24pt;
}
.picture
We set our little sample picture to float right, as it does in the screen style sheet.
.picture {
float: right;
}
This technique allows you to maintain a completely separate style sheet for IE4 and Netscape 4.
Since modern browsers never see this style sheet, you do not have to worry about styles
cascading from one sheet to another or of using cumbersome and complicated filter hacks. Your
version 4 style sheet contains only safe rules.
Note: Since the starter page already contained the command, the window will open in "modify" mode with the
original document-relative path we set. You'll know you are in "modify" mode because the window will display
Apply and Remove buttons.
-Enter an absolute or site relative path in the Path to version 4 Style Sheet box
-Make sure the Apply for Netscape 4.x browsers only box remains unchecked
-Click the Apply button
Previewing in Netscape 4
Once you change the version 4 style sheet path to absolute (or site relative) you will not be able
to preview the page locally unless you temporarily change the path back to document relative.
The PVII Write V4 Style Sheet command allows you to do this easily:
-Choose Commands: Studio VII: Write v4 Style Sheet by PVII
The Command window will open in Modify mode
-Use the Browse button to locate your v4 style sheet or type in the document relative path
-Make sure the Apply for Netscape 4.x browsers only box remains unchecked
-Click Apply
IMPORTANT! Make sure you set the path back to absolute or site relative before publishing the
page to the Internet.
body
The body selector carries the background color and image.
IMPORTANT: In order for Netscape 4 to find your background images, change the path to the image to either
Absolute or Site Relative before publishing your site.
body {
background-image: url(assets/fab_pbg.jpg);
background-color: #B6A29B;
}
#masthead
The masthead is set to 528px wide and given a 1px border. Background-color is set to white.
#masthead {
background-color: #FFFFFF;
border: 1px solid #000000;
width: 528px;
}
#masthead h1
For version 4 browsers we will not be using the masthead background so the print logo inside
the masthead's <h1> element will remain visible as it is in the print style sheet. We give the <h1>
element 6 pixels of padding to create a bit of white space inside the masthead's border.
#masthead h1 {padding: 6px;}
Paragraphs inside maincontent are given a top margin of 6px, a right margin of 24px, a bottom
margin of 12px, and a left margin of 24px. The left and right margins are set instead of padding
because padding will cause the maincontent DIV to push out and obscure part of the sidebar.
Font-size is also set here to eliminate inheritance issues with Netscape 4.
#maincontent p {
margin: 6px 24px 12px 24px;
font-size: 14px;
}
The level 2 headings inside maincontent are given left and right margins to match the
paragraphs.
#maincontent h2 {
color: #B9A199;
font-size: 24px;
font-weight: normal;
margin: 24px 24px 0 24px;
}
The following 3 selectors style all links inside maincontent. Though Netscape 4 does not
understand hover or active, IE4 does.
#maincontent a:link {
color: #A78A82;
}
#maincontent a:visited {
color: #B9A199;
}
#maincontent a:hover, #maincontent a:active {
color: #333333;
}
#introSection
The background image does work in version 4 browsers. Font-size is set to 12px.
#introSection {
background-image: url(assets/fab_quote.gif);
background-repeat: no-repeat;
color: #95847B;
font-size: 12px;
padding: 0 0 0 40px;
}
#sidebar
The sidebar is positioned absolutely. Its left property is set to 560px, which sets it comfortably to
the right edge of the maincontent DIV.
#sidebar {
color: #E4E0DE;
font-size: 12px;
width: 200px;
position: absolute;
top: 120px;
left: 560px;
}
Since the sidebar is not assigned a background color (or image) there is no need for left or right
padding on its contents. The <h3> element is colored white, given a 16px font-size, and a 24px
top margin.
#sidebar h3 {
color: #FFFFFF;
font-size: 16px;
margin: 24px 0 0 0;
}
The following 3 selectors style all links for each of the navbar lists.
.navbar a:link, .navbar a:visited {
color: #E4E0DE;
}
.navbar a:hover, .navbar a:active {
color: #333333;
}
#footer
We set the footer styles and the footer link styles.
#footer {
color: #E3DFDD;
font-size: 10px;
padding: 12px 0 0 0;
}
#footer a:link, #footer a:visited {
color: #675954;
}
#footer a:hover, #footer a:active, #footer a:focus {
color: #FFFFFF;
}
#introControls, #tagline {display: none;}
Note: While Opera 5,6 supports most CSS2 style properties, it is still lacking in support for many dynamic
interactions and does not support class name changes.
Overview
SwapClass by PVII works by automatically changing (swapping) the class name assigned to
elements on your page to another class name that you select. SwapClass scans your page for
all elements that are assigned to the "Swap From" class and changes the class assignment to
the "Swap To" class. You also control the scope of the swapping by selecting one or more
specific html element(s) that will be scanned. This allows you to actually use the class name on
other elements on your page without being affected by the swap.
SwapClass also allows you to select a specific element (by selecting its id) to receive a direct
class name change while still swapping all other instances. This is ideal for managing CSS-
based menus or other presentations.
A nifty "Toggle" feature is built in to allow you to automatically switch the class being swapped
each time the event is triggered. This allows the user to repeatedly fire the event, each time the
swapping is reversed.
SwapClass can be triggered by any element on the page that supports an event trigger. In
modern browsers most of the elements on the page can be used as a trigger. In addition to the
normal event triggers, null link, image, image map, you can also use most html tags, for example
<p>, <div>, <h1>, <h2>, etc.. The behavior on these tags can be set to fire onMouseOver,
onClick, onMouseOut just like the usual triggers.
1. Select (click) an element that will act as the trigger for the behavior.
2. Click the plus button (+) on the Behaviors Panel.
3. Choose Studio VII - CSS - swapClass by PVII to open the interface.
4. Select a Swap From class.
5. Select a Swap To class
6. Select one or more tags in the Tags to Use listing.
7. Optionally set the Element to Use and Toggle boxes
8. Click OK to apply the behavior.
Swap From
This listing shows all of the CSS class names that are on your page or defined in any style
sheets that are linked to your page. Select the class name that you wish to change. All of the
elements on your page that are set to this class will be automatically changed to use the class
you select in the "Swap To" box.
Swap To
This listing shows all of the CSS class names that are on your page or defined in any style
sheets that are linked to your page. Select the class name that you wish to change to. All of the
elements on your page that are set to the "Swap From" class will be automatically changed to
use this class.
Tag To Use
SwapClass allows you to limit the class changes (swaps) to only the elements that are contained
in the html tags you specify. The class swapping will only occur for tags that you select. This
allows you to swap class names in one set of tags, <div class="foo"> for example, without
affecting other elements on the page that are also set to that class, <p class="foo"> for example.
All of the html tags currently on your page are listed here, if you add more elements they will
Select Tag
Click this button to add a tag to the selection list. The word "(Selected)" will appear to the right of
the tag name.
Deselect Tag
Click this button to remove a "Selected" tag. The word "(Selected)" will no longer appear to the
right of the tag name.
None
Select "none" if you do not wish to use this feature.
Select an id
Select one of the id's in this listing. All of the normal class swapping will occur based on the class
selections made in the "Swap From" and "Swap To" boxes. Additionally, the element that is set
to the selected id will receive a direct class name change to the class that is selected in the
"Swap From" box.
Toggle Option
The Toggle Option will switch the "Swap From" and "Swap To" classes each time the event is
triggered. If an id is selected in the "Set This Element" box, then only the element with that id will
use the toggle feature, the other elements will receive a standard swap.
Overview
The Write V4 Styles by PVII command adds a script to your page that will link the style sheet you
specify if the browser is a version 4 browser. This style sheet is applied to the page before the
page loads so the styles are completely applied to all page elements before they become
viewable. The system even allows you to target only Netscape 4.x browsers for this behavior or,
the default, all version 4 browsers.
Note: Netscape 4.x browsers will disable CSS whenever JavaScript is disabled so there is no concern about
using JavaScript to load the style sheet. If the user has JavaScript disabled in Netscape 4.x the browser will also
disable all CSS, it cannot be set independently.
The @import directive is not understood by Netscape 4.x browsers and will be completely
ignored, thus hiding the style sheet form Netscape 4.x browsers.
The syntax of the @import statement can also be used to hide the style sheet from IE 4.x
browsers:
@import "mystyles.css";
Note: The default @import syntax used by Dreamweaver (@import url(../test.css);) will hide CSS from all version
4 browsers except for later versions of IE4 that shipped with Windows 98. If you use Dreamweaver to Import
your style sheet, you will need to edit the @import directive to this syntax. If you subsequently move an HTML or
CSS file using Dreamweaver's site or files panels, Dreamweaver will overwrite your syntax.
Now that the main version 5+ style sheet is linked to the page using the @import directive you
can apply the Write V4 StyleSheet by PVII command to dynamically load the version 4 style
sheet. The result is that only one style sheet will be seen by any browser, either the version 4 or
the version 5+ depending on the browser, providing complete independence and separation of
the style sheets.
Note: Modify is not supported when the scripts are located in an externally linked JavaScript file, you must
manually edit the scripts or add the scripts back to the page.
Note: Remove is not supported when the scripts are located in an externally linked JavaScript file, you must
manually remove the scripts from the external file.
Note: For maximum browser compatibility we suggest that you use a absolute url for this path in order to allow
Netscape 4 browsers to locate the style sheet if the style sheet is not in the same folder as the current page.
Browse
Click the Browse button to navigate to the style sheet. A Select File dialog will open. Navigate
to the style sheet file you wish to use and click the OK button. The file path will then be displayed
in the Path to version 4 Style Sheet box. You can manually edit this path as you desire.
Apply
When you are finished entering or editing the path, and set the option, click the Apply button to
apply the Write V4 StyleSheet by PVII scripts to your page. You can preview the page in your
browser to check functionality.
Note: When using an absolute url for the path be sure that the style sheet has been uploaded to your server and
that your internet connection is available.
Note: If the scripts are located in an external JavaScript file the Remove function will be unavailable, you must
manually remove the scripts from the external file.
Cancel
Click the Cancel button to completely abort the current Write V4 StyleSheet by PVII operation.
This will close the interface and no changes will be made to your page.
Help
Click the Help button to open the associated Help File in your browser. This page can remain
open for easy reference while you continue working with the Write V4 StyleSheet by PVII by
PVII interface.