Graphics Programs Reference
In-Depth Information
The two types of comments you can add to the code of pages are single line and mul-
tiline. In Code view, all comments are displayed in gray. Single-line comments span only
one line and are coded as
<!-- comment -->
where comment is the content of the comment. Multiline comments span more than one
line and are coded as
/*ƒ comment ƒ*/
where comment is the content of the comment.
In the prebuilt pages, Dreamweaver adds a comment before each of the closing div
tags. This is helpful because all closing div tags look alike in the code as
</div>
and because the order of the closing tags makes a difference in the way the code works.
Remember that tags are paired sets (opening and closing) and that the rule is fi rst on last
off. The comments help distinguish one closing div tag from another and ensure that the
tags are in the right order in the page. When you create CSS layouts with multiple divs in
the page, Dreamweaver does not add comments to the code, so it is a good idea to do
this yourself.
The prebuilt pages also use good coding practices to make the code easier to under-
stand. Programmers usually insert each new tag at the beginning of a line, when possi-
ble. When a tag is contained within another tag, the relationship is called a parent-child
relationship . The outside container tag is the parent , and the inside contained tag is the
child . Programmers usually indent the child tag to indicate that the child tag is contained
inside a parent tag. The convention of using indents to indicate hierarchy is considered
good practice because it makes the code easier to follow and to understand.
You will examine a prebuilt page with a fl uid or liquid layout. Flexible layouts enable
you to maximize your design to fi ll the user's browser window.
To view prebuilt CSS fluid layout pages:
1. Reset the Dreamweaver workspace to the Designer configuration, and then open
the NextBest Fest site you created in Tutorial 3.
2. On the Application bar, click File , and then click New . The New Document dialog
box opens. Select Blank Page, then select HTML from the Page Type column.
You can also click More
in the Create New section
of the Welcome screen to
open the New Document
dialog box.
3. In the Layout box, click 2 column liquid, left sidebar . An image of the page with
the layout appears at the right of the page. See Figure 4-1.
Search WWH ::




Custom Search