Tips to convert layers into tables

Instead of using tables or Layout mode to create your layout, some web designers prefer to work with layers. Dreamweaver enables you to create your layout using layers, then (if you want) convert them into tables. For example, you might need to convert your layers to tables if you need to support browsers before version 4.0.

NOTE: You can’t convert layers to tables or tables to layers in a template document or in a document to which a template has been applied. Instead, create your layout in a non-template document and convert it before saving it as a template.

You can convert back and forth between layers and tables to adjust the layout and optimize page design. You cannot convert a specific table or layer on a page; you must convert layers to tables and tables to layers for an entire page.

NOTE: Converting from layers to tables may result in tables with a large number of empty cells.

Preventing layer overlaps

Because table cells cannot overlap, Dreamweaver cannot create a table from overlapping layers. If you plan to convert the layers in a document to tables, use the Prevent Overlap option to constrain layer movement and positioning so that layers don’t overlap.

When this option is on, a layer can’t be created in front of, moved or resized over, or nested within an existing layer. If you activate this option after creating overlapping layers, drag each overlapping layer to move it away from other layers. Dreamweaver does not automatically fix existing overlapping layers in the page when you enable Prevent Layer Overlaps.

When this option and snapping are enabled, a layer won’t snap to the grid if it would cause two layers to overlap. Instead, it will snap to the edge of the closest layer.

NOTE: This is a new Note table. It is attached to a ta Table_anchor paragraph tag. To create one, copy and paste from the reference page.

NOTE: Certain actions allow you to overlap layers even when the Prevent Overlaps option is enabled. If you insert a layer using the Insert menu, enter numbers in the Property inspector, or reposition layers by editing the HTML source code, you can cause layers to overlap or nest while this option is enabled. If overlaps happen, drag overlapping layers in the Design view to separate them.

To prevent layers from overlapping, do one of the following:

1. In the Layers panel (Window > Layers), select the Prevent Overlaps option.

2. In the Document window, select Modify > Arrange > Prevent Layer Overlaps.

Converting between layers and tables

You can create your layout using layers, then convert the layers to tables so that your layout can be viewed in older browsers.

Before you convert to tables, make sure layers do not overlap.

To convert layers to a table:

1. Select Modify > Convert > Layers to Table.

The Convert Layers to Tables dialog box appears.

2. Select the desired options.

3. Click OK.

The layers are converted to a table.

To convert tables to layers:

1. Select Modify > Convert > Tables to Layers.

The Convert Tables to Layers dialog box appears.

2. Select the desired options.

3. Click OK.

The tables are converted to layers. Empty cells are not converted to layers unless they have background colors.

NOTE: Page elements that were outside of tables are also placed in layers.