|
Unit 4. Working with text (III) |
We have already seen how Dreamweaver lets us create styles quickly and simply. Created styles are grouped in a styles sheet located in our document, but we could use styles in sheets external to the document.This is particularity useful when we're designing a web site with many Pages, because it allows you to define a sheet of styles to be used for all the site Pages which facilitates the design. Let's see how styles sheets work, through the Design panel, CSS styles tab, that can be opened through Window menu, CSS styles option. Also by pressing Shift+F11. To simplify the explanations we'll call CSS Styles panel to the tab CSS styles in the design panel. |
|
|
This window will show up:
In File/URL you must specify the path and the name of the styles sheet. We need to select whether we want to link, or import the styles sheet. If we choose Link the sheet will not be inlayed but it will add a reference to the Page, so that, when you make any change, this will be automatically referenced in all the Pages that use the sheet. If we choose Import, the sheet is inlayed in the Page. After clicking OK, the sheet with its styles will be in the CSS Styles panel.
|
This window appear:
|
| In this window you can specify the Name of the style, (without spaces and starting with a dot). In Class you can specify whether the style is going to be a personal one. In Tag you can modify an existing label attribute, and in Name the HTML labels list that can be redefined, such as BODY, A, FORM, TABLE, etc. Advanced allows us to redefine the format of a labels' combination. In Define in: it's determined whether the style is added to the style sheet of the document (This document only), whether a new styles sheet is added (New Styles Sheets File), or if the selected styles sheet is added. After clicking on the OK button, you will see a window like this one, and you will define the style: |
By selecting various categories you can specify different properties, as many of them could not have been selected through the Properties panel. For example, through the Background category, you can specify the background colour for a text paragraph or for the entire page. |
|
You can also open this window by right-clicking in the style in CCS Styles panel, selecting the drop-down panel, and selecting the Edit option.
As you can see, it's very easy to work with CSS Styles. The HTML code which indicates that a styles sheet has been imported or linked in the document, would be like this: <style type="text/css"> <!-- @import url("file:///C|//aulaclic/prueba.css"); --> </style> or this : <link href="pru.css" rel="stylesheet" type="text/css"> And the code which would indicate that a personal style has been applied to an object (a class), would be similar to this one: <p class="mystyle">Welcome to my page</p>
|
| |
|
|
Page 4.3 |
|
Legal
warning: Authorised on-line use only. It is not allowed the use
of these courses in companies or private teaching centres.
|