Section 8.5. Drawing with the Layer Tool

8.5. Drawing with the Layer Tool

Dreamweaver wouldn't be Dreamweaver if it didn't give you several ways to perform a certain task, like creating a layer. You can create a layer as described above or turn to two methods designed specifically for adding layers to a page: You can drag to create a layer freehand or use a menu command to insert a full-blown, complete layer. Your choices are:

  • Use the Layer tool . The Draw Layer tool is in the Insert bar, on the Layout tab (see Figure 8-5). Click the Layer button and then drag the + cursor diagonally in the document window to create a boxthe outline of the layer.


    Tip: For accurate drawing, you should hide Dreamweaver's visual aids (like the layer border and selection handles), which take up space, moving layers slightly out of position in Design view. Ctrl+Shift+I ( -Shift-I) does the trick.
  • Use a menu command . To insert a layer at the insertion point, choose Insert Layout Objects Layer.

    If you don't like the looks of the default layer that Dreamweaver inserts , choose Edit Preferences (Dreamweaver Preferences), select the Layers category, and then adjust the default layers properties there. Add a background color , for example, or increase the layer's size . From then on, you can instantly create your favorite kind of layer using the Insert Layer command.

However, Dreamweaver's layer tools have one drawback: they create internal styles with generic names like Layer1, Layer2, and so on. That means you don't get to take advantage of the byte-saving virtues of an external style sheet until you export the styles to an external style sheet, as described on Section 6.2.2. In addition, you'll have to take a second to rename these layers to something a little more understandablefor example, changing Layer1 to banner . (Fortunately, the Layers panel makes this easy to do, as shown in Figure 8-9.)

So the Draw Layer tool provides ease of use up front, but you'll have to do a bit of work to turn the layers into logically named styles that can be shared by all of the pages in your site. You're better off taking the time to initially create a layer using the CSS Rule Definition window, as described on Section 8.3. And as you'll see below, you can still take advantage of Dreamweaver's WYSIWYG tools for working with layers.


Note: When you draw a layer, Dreamweaver also inserts some JavaScript code to make the page work well in Netscape Navigator 4. For most designers, this is a needless precaution, since Navigator 4 has pretty much disappeared from the planetalthough a museum in Copenhagen apparently has a copy. You can turn this feature off to prevent Dreamweaver from inserting this extra code: open the Preferences window (Ctrl+U [ -U]), click the Layers category, and turn off the "Add resize fix" box.


Dreamweaver 8[c] The Missing Manual
Dreamweaver 8[c] The Missing Manual
ISBN: 596100566
EAN: N/A
Year: 2006
Pages: 233

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net