Al's TAFE Certificate IV I.T. (Website Design) Exercises

Cascading Style Sheets 4

In Dreamweaver® you can write your own style sheet, by selecting File > New and on the General Tab choose a CSS Basic Page to create your own external style sheet coding. There are also some built-in Dreamweaver style sheets under the CSS Style Sheets heading.

Another way to work with Styles in Dreamweaver is to use the CSS styles panel which can be opened using Shift + F11 or Windows > CSS Styles.
CSS Styles panel
Click the "New CSS Style" button on the panel to begin a new style.

The New CSS Style dialog box opens
New CSS Style dialog box
Here you can define a custom class or redefine a tag or selector, and you can choose to put this style information in the local document or in an external style sheet.
The options are: -

When you make your choices from the above box you are then presented with the CSS Style Definitions dialog box.
CSS Style Definitions dialog box
This box allows you to create a new style and to edit existing styles. It has 8 different windows that cover different aspects of CSS, controlled by the Category list at the left of the above picture.

Type

As in the diagram above the type category lists the type options available in the CSS Style Definition dialog box. These are:-

Dreamweaver MX shows most CSS elements in the Design window. Test in a few browsers to be sure though.

Background
Background dialog box

As shown in the picture above there are several options available in the Background Category. Background category controls how the background appears and this is used for controlling the background of block elements. This could be applied to elements such as paragraph, layer <div>, table or any other separate elements. They could all have their own background defined for them. Make sure you apply this to the correct tag. The options here are:-

Block
Block dialog box

The block category lets you control the style of block elements such as paragraphs, which are discrete pieces of HTML.
You can control:-

Box
Box dialog box

The box option controls element spacing and placement on the page. This needs to be tested in browser as most will not show up in design view. The options are: -


Border
Border dialog box

The border option sets a border around a chosen element. This gives you lots more control than you would have by creating a border by other means.
The border options are:-

List
Lists dialog box

The list category provides options for making a numbered or bulleted list. Some of the options available are:-


Positioning
Positioning dialog box

This is the main means to control where page elements will appear on your page. CSS positioning can be applied to most block level elements, but they are generally used with layers. Layers are really <div> tags that contain an inline style using absolute positioning, (which we learned about in week 2 of CSS). Check for browser support. The options are: -


Extensions
Extensions dialog box

These are CSS level 2 options so they are not supported by some browsers.
The options are:-