Setting Layer Appearance
Layers created in FrontPage are automatically transparent. In other words, no one can see the outline or background of this invisible containeronly whatever objects you put in it. Most designers prefer layers this way, because a layer's content is the real star of the show. But, if you want, you can give your layers a little personality by adding a border or a background (see Figure 8-4).
Figure 8-4. Layers don't have to be invisible. You can add a background color to set off one area of a page (upper left). Or you can use borders to do the same thing and make it look like a picture frame (upper right). By adding background color, foreground color, and a border you can even make a layer look like a button (lower left). Though a much better way to include buttons in your layer is to insert FrontPage's interactive buttons into the layer (lower right), which you'll learn about in the next tutorial.
To do so, first select the layer. Then, within the Layers task pane, click Borders and Shading. The Borders and Shading dialog box that appears offers the following options:
Set border style. If you want to outline the edge of your layer, give it a border. When you make a selection, FrontPage previews its effect within the Border tab.
Set layer padding. Layer padding is like cell padding. (Recall from Improving Your Web Page that padding is the distance between a border and its content.) But you can be more persnickety here than you can be within a table cell. FrontPage lets you specify a different setting for each side of the layer. This might be useful if you want to set text away from the left edge of a layer, for example.
Set layer background and foreground. Click the Shading tab to access options for setting the background of your layer. Then choose a color or use a picture. If a picture is smaller than the layer, it will tile (appear multiple times) just like it does in a cell. Use the Foreground color field to control text color in a layer.
The Layers task pane doesn't give you any way to align content within your layer. Instead, you need to use the alignment tools you learned about earlier (Formatting Paragraph). First, select the text or picture that you wish to align. On the Formatting toolbar, click the alignment button (left, center, justify, or right) you want, or select Format » Paragraph and set alignment within the Paragraph Properties dialog box.
When FrontPage creates a layer, it makes layer content visible automatically. But there are times when you want a layer to be entirely invisible to viewers. This is usually so you can pull off some masterful sleight of hand. Imagine this: on your Web site, a visitor's cursor passes over text that says "Grand Canyon" and a picture of the canyon appears in the middle of the screen. The cursor then passes over text that says "Yellowstone," and a picture of Old Faithful replaces the photo of the Grand Canyon. You can easily create this impressive effect by using FrontPage Behaviors (which you'll read about in the next tutorial) to make a layerlike the one containing the picture of Old Faithfulinvisible and then visible.
To see your visibility options, right-click a layer within the Layers task pane. Three visibility choices appear on the pop-up menu:
Visibility: Default is the automatic setting FrontPage gives to any new layer. In other dialog boxes, FrontPage calls this option Inherit. Under this setting, the layer is visible, but if you give it a parent layer (a way to make one layer share another layer's attributes, which you'll read about in the next section) the layer automatically takes on the visibility setting of its parent.
Visibility: Visible means that the layer is visible no matter what (even if its parent is invisible).
Set Visibility: Hidden makes the layer invisible no matter what (even if its parent is visible).
Right-clicking gave you access to all those choices, but there's actually a much easier way to set visibilitywith a simple click in the Layers task pane (see Nesting Layers).updated