Laying Out Pages With Css - Adobe 38040334 - Dreamweaver CS3 User Manual

Pc
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

DREAMWEAVER CS3
145
User Guide

Laying out pages with CSS

About CSS page layout
A CSS page layout uses the Cascading Style Sheets format, rather than traditional HTML tables or frames, to
organize the content on a web page. The basic building block of the CSS layout is the div tag—an HTML tag that in
most cases acts as a container for text, images, and other page elements. When you create a CSS layout, you place div
tags on the page, add content to them, and position them in various places. Unlike table cells, which are restricted to
existing somewhere within the rows and columns of a table, div tags can appear anywhere on a web page. You can
position div tags absolutely (by specifying x and y coordinates), or relatively (by specifying their distance from other
page elements).
Creating CSS layouts from scratch can be difficult because there are so many ways to do it. You can create a simple
two-column CSS layout by setting floats, margins, paddings, and other CSS properties in a nearly infinite number of
combinations. Additionally, the problem of cross-browser rendering causes certain CSS layouts to display properly
in some browsers, and display improperly in others. Dreamweaver makes it easy for you to build pages with CSS
layouts by providing over 30 pre-designed layouts that work across different browsers.
Using the pre-designed CSS layouts that come with Dreamweaver is the easiest way to create a page with a CSS layout,
but you can also create CSS layouts using Dreamweaver absolutely-positioned elements (AP elements). An AP
element in Dreamweaver is an HTML page element—specifically, a
tag, or any other tag—that has an absolute
div
position assigned to it. The limitation of Dreamweaver AP elements, however, is that since they are absolutely
positioned, their positions never adjust on the page according to the size of the browser window.
If you are an advanced user, you can also insert
tags manually and apply CSS positioning styles to them to create
div
page layouts.
For a tutorial on creating CSS page layouts, see www.adobe.com/go/vid0155.
See also
"Working with div tags" on page 162
About CSS page layout structure
Before proceeding with this section, you should be familiar with basic CSS concepts.
The basic building block of the CSS layout is the div tag—an HTML tag that in most cases acts as a container for text,
images, and other page elements. The following example shows an HTML page that contains three separate div tags:
one large "container" tag, and two other tags—a sidebar tag, and a main content tag—within the container tag.
September 4, 2007

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents